#include <bits/stdc++.h>
unsigned inp() {
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  unsigned sum = 0;
  while (c >= '0' && c <= '9') {
    sum = sum * 10 + c - '0';
    c = getchar();
  }
  return sum;
}
struct Poly {
  unsigned f[1000];
  void init() { memset(f, 0, sizeof(f)); }
};
Poly operator*(Poly a, Poly b) {
  Poly ret;
  ret.init();
  for (unsigned i = 0; i <= 300; i++)
    for (unsigned j = 0; j <= 300; j++) ret.f[i + j] += a.f[i] * b.f[j];
  return ret;
}
void operator*=(Poly &a, Poly b) { a = a * b; }
Poly fpow(Poly a, unsigned b) {
  Poly sum;
  sum.init();
  sum.f[0] = 1;
  for (; b; b >>= 1) {
    if (b & 1) sum *= a;
    a *= a;
  }
  return sum;
}
signed main() {
  unsigned n = inp();
  unsigned p = inp();
  unsigned q = inp();
  Poly C;
  C.init();
  C.f[0] = C.f[1] = 1;
  C = fpow(C, n);
  unsigned ans = 0;
  for (unsigned i = 1; i <= q; i++) {
    unsigned _pow = 1;
    unsigned res = 0;
    for (unsigned j = 0; j <= std::min(p, n - 1); j++) {
      res += C.f[j] * _pow;
      _pow *= i;
    }
    res *= i;
    ans ^= res;
  }
  printf("%u\n", ans);
}
