#include <bits/stdc++.h>
using namespace std;
int a[1001];
int main() {
  int a1, a2, n;
  scanf("%d%d%d", &a1, &a2, &n);
  a[0] = a1;
  a[1] = a2;
  for (int i = 2; i <= n; i++) {
    a[i] = a[i - 1] + a[i - 2];
  }
  printf("%d\n", a[n]);
  return 0;
}
