The Travels of the Gnomes
The dwarves, known for their forest-dwelling lifestyle, seldom traveled and mostly moved on foot. However, they constructed their subway long before humans did, using it only for long-distance journeys.
Traveling was time-consuming, and subway tickets were quite costly. Nevertheless, they decided that any dwarf holding a "lucky" ticket would travel for free. In the dwarves' terms, a ticket is deemed lucky if, in the p-th numeral system, the sum of the digits in the first k positions equals the sum of the digits in the last k positions. It is known that ticket numbers in the dwarves' subway always consist of 2k positions.
The question is: how many dwarves will be able to travel on the subway for free under these conditions? Note that the dwarves are very fair; if one of them has already received a free ride, they always pass the next lucky tickets to their friends.
Input
The input consists of a single line containing the values p and k, separated by a space.
Output
Output the number of dwarves who can travel for free, calculated modulo 18446744073709551616.
Constraints
The dwarves secretly revealed that during their journey to Bucharest via Lviv, they discovered the lucky Lviv number 4. Therefore, the numeral system and ticket numbers are now such that they satisfy the condition: k(p-1) + 1 <= 4444.