#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1000], b, c, d;
  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];
}
