E. Research
time limit per test
3 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
3 100 1 2
Output
125000001
Input
10 10 9 10
Output
60520013