#include <bits/stdc++.h>
using namespace std;
long long a, b, c, n;
int main() {
  cin >> a >> b >> n;
  if (n == 0) {
    cout << a;
    return 0;
  }
  if (n == 1) {
    cout << b;
    return 0;
  }
  for (int i = 2; i <= n; i++) {
    c = a + b, a = b, b = c;
  }
  cout << c;
  return 0;
}
