#include <bits/stdc++.h>
using namespace std;
int a[100000], b, c, n, m, x, y, z, s;
int main() {
  cin >> a[0] >> a[1] >> n;
  if (n <= 1)
    cout << a[n];
  else {
    for (int i = 2; i <= n; i++) {
      a[i] = a[i - 1] + a[i - 2];
    }
    cout << a[n];
  }
  return 0;
}
