#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
int a, b, c, d, i, j, n, m, k;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  for (int _n((c)-1), i(0); i <= _n; i++) {
    long long d = a + b;
    a = b;
    b = d;
  }
  cout << a << endl;
}
