#000030

dafina

Mr. Dafin and his wife Mrs. Jezdina have opened a store in their village and they are purchasing poultry. However, they want to trick the villagers buy paying for the poultry with not only real, but also with counterfeit money. Every bill has a serial number which is an array of natural numbers. Fake bills are different from the real ones because adjacent numbers in the serial numbers do not have a difference of greater than one. A serial number contains N natural numbers where every number is less than or equal to K. Your task is to write a program that finds the number of printed fake bills. You can assume that every serial number is unique and that every possible serial number is printed.


InputThe first and only line of the standard input contains two integers, N (0<N<=100) and K (K<=20).

OutputTo the standard output in one line write the number of fake vouchers.

Input:
4 3
Output:
41

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.