#include <bits/stdc++.h>
using namespace std;
const int N = 131;
int n, p, q, k[N];
unsigned C[N], ans, tmp, now;
inline unsigned ksm(unsigned a, unsigned b = (1u << 31) - 1) {
  unsigned res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
int main() {
  scanf("%d%d%d", &n, &p, &q);
  if (p >= n) p = n - 1;
  C[0] = 1;
  for (register int i = 1; i <= p; ++i) {
    int a = n - i + 1, b = i, c = __builtin_ctz(a), d = __builtin_ctz(b);
    a >>= c;
    b >>= d;
    C[i] = C[i - 1] * a * ksm(b);
    k[i] = k[i - 1] + c - d;
  }
  for (register int i = 1; i <= p; ++i) C[i] <<= k[i];
  for (register int i = 1; i <= q; ++i) {
    tmp = now = 1;
    for (register int j = 1; j <= p; ++j) tmp += C[j] * (now *= i);
    ans ^= i * tmp;
  }
  printf("%u", ans);
}
