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