#include <bits/stdc++.h>
using namespace std;
const long long INF = 9999999999999999;
const double PI = acos(-1);
long long A[100];
int main() {
  ios::sync_with_stdio(false);
  long long a, b, c;
  cin >> a >> b >> c;
  A[0] = a;
  A[1] = b;
  for (long long i = 2; i < 50; i++) {
    A[i] = A[i - 1] + A[i - 2];
  }
  cout << A[c];
  return 0;
}
