#include<stdio.h>
#define N 30
int i=0;
int a[N];
int fun(int first, int second, int num)
{
int temp;
a[i] = first;
a[i+1] = second;
while(num --)
{
++i;
a[i+1] = a[i-1] + a[i];
}
return a[i-1];
}
int main()
{
int a, b, n;
scanf("%d %d %d", &a, &b, &n);
printf("%d\n", fun(a, b, n));
return 0;
}