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