#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b = 0, k, t[30], j;
  cin >> t[0] >> t[1] >> a;
  for (j = 2; j <= a; j++) t[j] = t[j - 1] + t[j - 2];
  cout << t[a];
  return 0;
}
