#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, n;
  cin >> a >> b >> n;
  long long int arr[n + 1];
  arr[0] = a;
  arr[1] = b;
  for (int i = 2; i <= n; i++) arr[i] = arr[i - 1] + arr[i - 2];
  cout << arr[n];
  return 0;
}
