Summer Institute @ University of Central Florida: Contest 1, Problem 5
Arup loves math. Many love the Fibonacci sequence, but true mathematicians love to generalize
results. As such, Arup prefers looking at the Generalized Fibonacci Sequence that is defined as
follows, where
For various Generalized Fibonacci Sequences, Arup would like to know the
Input Specification
The input consists of three non-negative, space separated integers:
Output Specification
The output will be a single integer, the
Sample Input 1
3 4 1
Sample Output 1
4
Sample Input 2
17 6 2
Sample Output 2
23
Sample Input 3
1 1 3749999997
Sample Output 3
499999999
Comments