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