#include <bits/stdc++.h>
using namespace std;
int main() {
  long long left(0), right(0), index(0);
  cin >> left >> right >> index;
  int k(1);
  while (k++ < index) {
    long long temp = left + right;
    left = right;
    right = temp;
  }
  cout << right;
  return 0;
}
