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