#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.second == b.second) return (a.first < b.first);
  return (a.second < b.second);
}
int main(void) {
  int a, b, c, d;
  cin >> a >> b >> c;
  if (c == 0) {
    cout << a;
    return 0;
  }
  if (c == 1) {
    cout << b;
    return 0;
  }
  for (long long i = 1; i < c; i++) {
    d = a + b;
    a = b;
    b = d;
  }
  cout << d;
}
