#include <bits/stdc++.h>
using namespace std;
bool bol = false;
bool visited[100007];
char fe, fa, fu, fi;
long long int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v,
    w, x, y, z;
long long int mis = 1000000007, mas = -1000000007, ans, bas, mid, son, st, en,
              temp, sum, prd, now;
string aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, nn, oo, pp, qq, rr,
    ss, tt, uu, vv, ww, xx, yy, zz;
long long int flusher(int isi, int jsj) {
  cout << "?"
       << " " << isi << " " << jsj << "\n";
  cout.flush();
  long long int answer;
  cin >> answer;
  return answer;
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(0);
  int Q = 1;
  while (Q--) {
  https:
    cin >> a;
  http:
    cin >> b >> n;
    for (long long int i = 2, bop = n; bop >= i; i++) {
      t = b;
      b = a + b;
      a = t;
    }
    cout << b << "\n";
  }
}
