#include <bits/stdc++.h>
using namespace std;
bool prime(int n) {
  if (n < 2) return false;
  if (n == 2) return true;
  if (n % 2 == 0) return false;
  for (int i = 3; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
int rev(int n) {
  int b = 0;
  while (n) {
    b *= 10;
    b += n % 10;
    n = n / 10;
  }
  return b;
}
int main() {
  int a, b, n;
  cin >> a >> b >> n;
  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] << endl;
}
