#include <bits/stdc++.h>
using namespace std;
const unsigned long long mod = 1ll << 32;
const int magic = 125;
struct matrix {
  unsigned long long a[131][131];
  matrix() { memset(a, 0, sizeof(a)); }
  void set1() {
    for (int i = 0; i < 131; i++)
      for (int j = 0; j < 131; j++) a[i][j] = (i == j);
  }
  matrix operator*(const matrix &t) const {
    matrix ret;
    for (int i = 0; i < 131; i++) {
      for (int j = 0; j < 131; j++) {
        if (a[i][j] == 0) continue;
        for (int k = 0; k < 131; k++) {
          ret.a[i][k] += a[i][j] * t.a[j][k];
        }
      }
    }
    return ret;
  }
} A[133];
unsigned long long kissme(unsigned long long x, unsigned long long k) {
  unsigned long long ans = 1;
  while (k > 0) {
    if (k & 1) ans = ans * x % mod;
    x = x * x % mod;
    k >>= 1;
  }
  return ans;
}
struct number {
  unsigned long long x, p;
  number(unsigned long long _x = 0, unsigned long long _p = 0) {
    x = _x;
    p = _p;
  }
  number operator*(const number &t) const {
    return number(x * t.x % mod, p + t.p);
  }
  number operator/(const number &t) const {
    return number(x * kissme(t.x, (1ll << 31) - 1) % mod, p - t.p);
  }
};
number makex(unsigned long long x) {
  unsigned long long p = 0;
  while (x % 2 == 0) x /= 2, p++;
  return number(x, p);
}
unsigned long long C(unsigned long long x, unsigned long long y) {
  number ans = number(1, 0);
  unsigned long long t = 1;
  for (int i = 1; i <= y; i++) {
    ans = ans * makex(x - i + 1) / makex(i);
    t = t * (x - i + 1) / i;
  }
  if (ans.p >= 32)
    return 0;
  else
    return ans.x % (1ll << (32 - ans.p)) * (1ll << ans.p);
}
unsigned long long c[211][211];
unsigned long long n, p, q;
unsigned long long dp[211], nxt[211];
int main() {
  cin >> n >> p >> q;
  p = min(p, n - 1);
  A[0].set1();
  for (int j = 0; j <= p; j++) {
    for (int t = 0; j + t <= p; t++) {
      A[1].a[j + t][j] = C(n - j, t);
    }
  }
  for (int i = 0; i <= p; i++) {
    for (int j = 0; j <= p; j++) {
    }
  }
  for (int i = 2; i <= magic; i++) A[i] = A[i - 1] * A[1];
  for (int i = 0; i <= p; i++) dp[i] = 1;
  unsigned long long ans = 0;
  for (int i = 1; i <= q; i++) {
    if (i % magic == 0) {
      memset(nxt, 0, sizeof(nxt));
      for (int j = 0; j <= p; j++) {
        for (int k = 0; k <= p; k++) {
          nxt[j] += dp[k] * A[magic].a[k][j];
        }
      }
      for (int j = 0; j <= p; j++) dp[j] = nxt[j];
    }
    unsigned long long t = 0;
    for (int j = 0; j <= p; j++) t += dp[j] * A[i % magic].a[j][0];
    ans ^= t * i % mod;
  }
  cout << ans << endl;
  return 0;
}
