#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int a, b, c;
  cin >> a >> b >> c;
  while (c--) {
    int pom = b;
    b = a + b;
    a = pom;
  }
  printf("%d", a);
}
