#include <bits/stdc++.h>
int main() {
  int a1, a2, a3;
  while (scanf("%d%d%d", &a1, &a2, &a3) == 3) {
    if (a3 == 0)
      printf("%d\n", a1);
    else if (a3 == 1)
      printf("%d\n", a2);
    else {
      a3--;
      int a = a1, b = a2, c;
      for (int i = 0; i < a3; i++) {
        c = a + b;
        a = b;
        b = c;
      }
      printf("%d\n", c);
    }
  }
  return 0;
}
