#include <bits/stdc++.h>
using namespace std;
int x, y, n, t;
int main() {
  cin >> x >> y >> n;
  for (int i = 3; i <= n + 1; i++) {
    t = x + y;
    x = y;
    y = t;
  }
  cout << y;
  return 0;
}
