Problem: Many of you know the famous Fibonacci sequence F:
F[1] = 1
F[2] = 1
F[i] = F[i - 1] + F[i - 2] for i > 2

Thus each number in sequence is a sum of two previous numbers except two first which are define as 1.

You've decided to create you own Fibonacci sequence. It's very similar to the one described above, but the first two numbers now are arbitrary non-negative integers A and B ( F[1] = A and F[2] = B ). Now you want to compute the N-th number in your sequence.

Input
The only line contains 3 space-separated integers A, B, N.

Output
Output one integer - the N-th number in your sequence.

Constraints
0 < A, B, N ≤ 10

SAMPLE INPUT
1 3 4

SAMPLE OUTPUT
7

Solution (in PYTHON):

Solution:
def is_int(token):
    try:
        int(token)
        return True
    except ValueError:
        return False
def printer(num1,num2,ranger):
    if(ranger==1):
        print (num1)
    elif (ranger==2):
        print (num2)
    else:
        for i in range(2,ranger):
            tempy=num1+num2
            num1=num2
            num2=tempy
        print (tempy)
a=raw_input()
in_split =a.split()
num1=in_split[0]
num2=in_split[1]
ranger = in_split[2]
if(len(in_split)==3):
    if(is_int(num1) and is_int(num2) and is_int(ranger)):
        num1=int(num1)
        num2=int(num2)
        ranger=int(ranger)
        if(num1>0 and num1<11 and num2>0 and num2<11 and ranger>0 and ranger<11 ):
            printer(num1,num2,ranger)