input:sequence.in output:sequence.out

Time Limits: 1000 ms Memory Limits: 524288 KB

Description

Input

Output

Sample Input

2 5 4

Sample Output

29

Data Constraint