K. The Great Treasure Dilemma
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
5 5
Output
10
Input
27 5
Output
224
Input
8 3
Output
20
Input
1000 28
Output
267430121