#include <bits/stdc++.h>
using namespace std;
long long b, c, d, a[21], ans;
int main() {
  cin >> b >> c >> d;
  a[0] = b;
  a[1] = c;
  for (int i = 2; i <= d; i++) a[i] = a[i - 1] + a[i - 2];
  cout << a[d];
  return 0;
}
