D. Chika Wants to Cheat
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output
Example
Input
2
3
1
Output
940984729