#include <bits/stdc++.h>
using namespace std;
const double eps = 1.0e-11;
const double pi = acos(-1.0);
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  if (c == 1) {
    cout << b << endl;
    return 0;
  }
  for (long long i = 0; i < c - 1; i++) {
    long long tmp = a + b;
    a = b;
    b = tmp;
  }
  cout << b << endl;
  return 0;
}
