#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128000000")
using namespace std;
const long double PI = 3.14159265358979323846;
const long double gammama = 0.57721566490153286060;
const long double eps = 1e-5;
const int INF = 1000 * 1000;
int main() {
  int a1, a2, a3;
  cin >> a1 >> a2 >> a3;
  vector<int> pos(a3 + 1);
  pos[0] = a1;
  pos[1] = a2;
  for (int i = 2; i < pos.size(); ++i) pos[i] = pos[i - 1] + pos[i - 2];
  cout << pos[a3] << endl;
  return 0;
}
