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