#include <bits/stdc++.h>
using namespace std;
class bign {
 public:
  int d[30];
  int deg;
};
int n;
long long f[25];
int main() {
  ios::sync_with_stdio(false);
  cin >> f[0] >> f[1] >> n;
  for (int i = 2; i <= n; i++) f[i] = f[i - 1] + f[i - 2];
  cout << f[n];
}
