#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int x, y, idx;
  cin >> x >> y >> idx;
  if (idx == 0)
    cout << x << endl;
  else if (idx == 1)
    cout << y << endl;
  else {
    idx -= 2;
    int z;
    while (true) {
      z = x + y;
      idx--;
      if (idx < 0) break;
      x = y;
      y = z;
    }
    cout << z << endl;
  }
}
