#include <bits/stdc++.h>
int main() {
  int f[2];
  int n;
  int i;
  while (scanf("%d%d%d", f, f + 1, &n) != EOF) {
    for (i = 2; i <= n; ++i) f[i & 1] = f[0] + f[1];
    printf("%d\n", f[n & 1]);
  }
  return 0;
}
