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