#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
template <class T>
bool get_max(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
bool get_min(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
int main() {
  int a, b, n, i, c;
  cin >> a >> b >> n;
  i = 0;
  while (i < n) {
    c = a + b;
    a = b;
    b = c;
    i++;
  }
  cout << a << endl;
  return 0;
}
