#include <bits/stdc++.h>
#pragma GCC optimize(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           \
    "-fdelete-null-pointer-checks,inline-functions-called-once,-funsafe-loop-optimizations,-fexpensive-optimizations,-foptimize-sibling-calls,-ftree-switch-conversion,-finline-small-functions,inline-small-functions,-frerun-cse-after-loop,-fhoist-adjacent-loads,-findirect-inlining,-freorder-functions,no-stack-protector,-fpartial-inlining,-fsched-interblock,-fcse-follow-jumps,-fcse-skip-blocks,-falign-functions,-fstrict-overflow,-fstrict-aliasing,-fschedule-insns2,-ftree-tail-merge,inline-functions,-fschedule-insns,-freorder-blocks,-fwhole-program,-funroll-loops,-fthread-jumps,-fcrossjumping,-fcaller-saves,-fdevirtualize,-falign-labels,-falign-loops,-falign-jumps,unroll-loops,-fsched-spec,-ffast-math,Ofast,inline,-fgcse,-fgcse-lm,-fipa-sra,-ftree-pre,-ftree-vrp,-fpeephole2,-ffast-math,unroll-loops,-funroll-loops,-fwhole-program,inline-functions,-fstrict-overflow,-falign-functions,no-stack-protector,-frerun-cse-after-loop,-funsafe-loop-optimizations,inline-functions-called-once", \
    3)
#pragma GCC target("avx,avx2", "sse2")
using namespace std;
int a1, a2, a3, t;
int main() {
  ios::sync_with_stdio(false);
  cin >> a1 >> a2 >> t;
  if (t == 0) {
    cout << a1;
    return 0;
  }
  if (t == 1) {
    cout << a2;
    return 0;
  }
  for (register int i = 2; i <= t; ++i) a3 = a1 + a2, a1 = a2, a2 = a3;
  cout << a3;
  return 0;
}
