An architect is designing a staircase where each step's height follows a modified Fibonacci sequence. In this sequence, each step height A_i (for i > 2) is the sum of the two preceding step heights: A_i = A_{i-1} + A_{i-2}.
The architect knows the height of the second step A_2, the height of the n-th step A_n (for some n \ge 3), and the total sum of the first n steps S_n.
Calculate the total height of the first n+2 steps (S_{n+2}).
Input
The input consists of three integers: A_2, A_n, and S_n (0 \le A_2, A_n, S_n \le 2 \cdot 10^{18}).
It is guaranteed that the given values correspond to a valid staircase sequence where n \ge 3 and the height of the first step is a non-negative integer (A_1 \ge 0).
Output
Print a single integer representing the sum of the first n+2 elements (S_{n+2}).
Examples
| standard input | standard output |
|---|
| 3 13 31
| 86
|