#D9975. Olympic Games

    ID: 8291 Type: Default 2000ms 256MiB

Olympic Games

Olympic Games

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

inputFormat

Input

outputFormat

Output

Examples

Input

1 1 1 2 100

Output

6

样例

1 1
1 2 100
6

</p>