#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int mod = 1000000007;
int lowbit(int x) { return x & (-x); }
int fast_power(int a, int b) {
  int x;
  for (x = 1; b; b >>= 1) {
    if (b & 1) x = 1ll * x * a % mod;
    a = 1ll * a * a % mod;
  }
  return x % mod;
}
int main() {
  int a, b, c, n;
  scanf("%d%d%d", &a, &b, &n);
  if (n == 1) {
    printf("%d\n", b);
    return 0;
  }
  for (int i = 2; i <= n; i++) {
    c = a + b;
    a = b;
    b = c;
  }
  printf("%d\n", c);
  return 0;
}
