#include <bits/stdc++.h>
using namespace std;
const int MAXN = 30;
int a[MAXN];
int main() {
  int aa, b, c;
  scanf("%d%d%d", &aa, &b, &c);
  a[0] = aa;
  a[1] = b;
  for (int i = 2; i <= c; i++) {
    a[i] = a[i - 1] + a[i - 2];
  }
  printf("%d", a[c]);
  return 0;
}
