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