#include <bits/stdc++.h>
using namespace std;
int dp[2000];
int fib(int x) {
  if (x == 0) return 0;
  if (x == 1) return 1;
  int &ret = dp[x];
  if (ret != 0)
    return ret;
  else
    return ret = fib(x - 1) + fib(x - 2);
}
int main() {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  int x, y, z;
  cin >> x >> y >> z;
  dp[0] = x;
  dp[1] = y;
  for (int i = 2; i <= z; ++i) dp[i] = dp[i - 1] + dp[i - 2];
  cout << dp[z];
  return 0;
}
