#include <bits/stdc++.h>
using namespace std;
unsigned int n, p, q, Ans;
unsigned int c[140];
unsigned int Gcd(unsigned int x, unsigned int y) {
  return !y ? x : Gcd(y, x % y);
}
unsigned int Cal(unsigned int x) {
  vector<unsigned int> v1, v2;
  for (unsigned int i = n - x + 1; i <= n; ++i) v1.push_back(i);
  for (unsigned int i = 2; i <= x; ++i) v2.push_back(i);
  for (unsigned int &a : v1) {
    for (unsigned int &b : v2) {
      unsigned int d = Gcd(a, b);
      if (d > 1) a /= d, b /= d;
    }
  }
  unsigned int ret = 1;
  for (unsigned int a : v1) ret *= a;
  return ret;
}
int main() {
  scanf("%u%u%u", &n, &p, &q);
  p = min(p, n - 1);
  c[0] = 1;
  for (unsigned int i = 1; i <= p; ++i) c[i] = Cal(i);
  for (unsigned int d = 1; d <= q; ++d) {
    unsigned int pw = 1, now = 0;
    for (unsigned int i = 0; i <= p; ++i, pw *= d) now += c[i] * pw;
    Ans ^= now * d;
  }
  printf("%u\n", Ans);
  return 0;
}
