#include <bits/stdc++.h>
const int N = 205;
unsigned poly[N], tmp[N];
int p, n, q;
void poly_pow(int n) {
  if (n == 1) {
    poly[0] = poly[1] = 1;
    return;
  }
  poly_pow(n >> 1);
  for (int i = 0; i <= p; ++i) tmp[i] = 0;
  for (int i = 0; i <= p; ++i)
    for (int j = 0; i + j <= p; ++j) tmp[i + j] += poly[i] * poly[j];
  if (n & 1)
    for (int i = p; i >= 1; --i) tmp[i] += tmp[i - 1];
  for (int i = 0; i <= p; ++i) poly[i] = tmp[i];
}
unsigned _pow[N];
int main() {
  std::ios::sync_with_stdio(0), std::cin.tie(0);
  std::cin >> n >> p >> q, p = std::min(p, n - 1), poly_pow(n);
  unsigned ans = 0;
  for (int i = 1; i <= q; ++i) {
    unsigned sum = 0, pow = 1;
    for (int d = 0; d <= p; ++d) sum += pow * poly[d], pow *= i;
    ans ^= i * sum;
  }
  std::cout << ans << '\n';
  return 0;
}
