#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool ckmin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <typename T>
inline bool ckmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int N = 2e6 + 10, P = 130 + 10;
int n, p, q;
unsigned int dp[P], p2[P], fac[P];
unsigned int qpow(unsigned int a, int b) {
  unsigned int res = 1;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) res = res * a;
  return res;
}
unsigned int inv(unsigned int second) {
  unsigned int first = 1u;
  first = first * (2 - first * second), first = first * (2 - first * second),
  first = first * (2 - first * second), first = first * (2 - first * second),
  first = first * (2 - first * second);
  return first;
}
void init(int n, int m) {
  fac[0] = 1;
  for (int i = (1), _x = (m); i <= _x; i++) {
    int k = __builtin_ctz(i);
    p2[i] = -k, fac[i] = inv(i >> k);
  }
  for (int i = (1), _x = (m); i <= _x; i++) {
    int k = __builtin_ctz(n + 1 - i);
    fac[i] *= ((n + 1 - i) >> k);
    p2[i] += k;
    fac[i] *= fac[i - 1];
  }
  for (int i = (1), _x = (m); i <= _x; i++) {
    p2[i] += p2[i - 1];
    fac[i] *= qpow(2, p2[i]);
  }
  return;
}
int main() {
  scanf("%d%d%d", &n, &p, &q);
  p = min(n - 1, p);
  init(n, p);
  for (int i = (0), _x = (p); i <= _x; i++) dp[i] = 1;
  unsigned int res = 0;
  for (int i = (1), _x = (q); i <= _x; i++) {
    for (int j = (0), _x = (p - 1); j <= _x; j++) {
      dp[j] = dp[j] + dp[j + 1] * (n - j);
    }
    unsigned int sum = 0;
    for (int j = (0), _x = (p); j <= _x; j++) sum += fac[j] * qpow(i, j);
    res ^= sum * i;
  }
  printf("%u\n", res);
  return 0;
}
