#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int res = 0, flag = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    res = res * 10 + ch - '0';
    ch = getchar();
  }
  return res * flag;
}
int a[21], n;
int main() {
  a[0] = read();
  a[1] = read();
  n = read();
  for (register int i = 2; i <= n; ++i) a[i] = a[i - 1] + a[i - 2];
  printf("%d\n", a[n]);
  return 0;
}
