P13263 [CodeChef] pcsc2
NOI
题目描述

Phillip has become fascinated with sequences lately. He looks for sequences all the time. His favorite sequence is the Fibonacci sequence, where any element is equal to the sum of the two previous elements. However, he isn't able to figure out the correct number for positions beyond 8 without writing it on paper. Create a program that will take in the first two number of a Fibonacci sequence and a number of places to calculate, and print out the number that is at that place.

Input
The first two numbers of a Fibonacci sequence, and the to print out. Note: you only need to handle 1 sequence per run.

Output
The number at the position specified.

Example 1
Input:
1 1 5

Output:
5

Example 2
Input
1 5 7

Output
45

输入格式

见题面

输出格式

见题面

样例输入
1 5 7
样例输出
45