2. Vocabulary
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

The alphabet of a certain language consists of only three letters — a, o, and c. Determine the maximum number of words of length N that can exist in the language, if each letter of the alphabet can appear in a word no more than K times.

Input

Two integers $$$N$$$ and $$$K$$$ are entered, each on a separate line ($$$1 \le N, K \le 30$$$).

Output

Print a single integer — the number of words.

Scoring

Subtask 1 (up to 25 points): $$$K \le 2$$$

Subtask 2 (up to 35 points): $$$N \le 15$$$

Subtask 3 (up to 40 points): $$$N \le 30$$$

Examples
Input
2
1
Output
6
Input
2
2
Output
9
Note

In the first example, the answer is 6 — these are the words ao, oa, oc, co, ac, and ca. In the second example, the answer is 9, as it also includes the words aa, oo, and cc.

Note that the answer in the last subtask can be quite large and may not fit into a 32-bit data type. It is recommended to use a 64-bit data type, for example, the long long type in C++, the int64 type in Pascal, the long type in Java and C#. Python automatically works with integers of any length.