E. Olympic Games
time limit per test
2 seconds
memory limit per test
256 megabytes
input
stdin
output
stdout

This problem was deleted from the contest, because it was used previously at another competition.

Input
Output
Examples
Input
1 1
1 2 100
Output
6