Counting cool words

In this problems, we say that a word is cool if it does not have two consecutive consonants. Write a program to compute how many words with nn lowercase letters, vv of which are vowels, are cool.

For instance, these are some of the many cool words for n=5n = 5 and v=3v = 3:

aabab ababa babaa toiep zeyui

Remember that there are 5 vowels and 21 consonants.

Input

Input consists of several cases, each with two natural numbers 1n151 \le n \le 15 and 0vn0 \le v \le n.

Output

For every case, print the number of cool words with nn lowercase letters, vv of which are vowels. This number is always smaller than 101810^{18}.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T11:33:52.892Z

© Jutge.org, 2006–2026.
https://jutge.org