#include <bits/stdc++.h>
const int MaxN = 1010;
long long f[MaxN];
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  f[0] = a, f[1] = b;
  for (int i = 2; i <= c; i++) f[i] = f[i - 1] + f[i - 2];
  printf("%I64d\n", f[c]);
  return 0;
}
