#include <bits/stdc++.h>
using namespace std;
vector<int> tmp;
const int maxn = 200;
unsigned int c[maxn];
int Gcd(int a, int b) { return (!b) ? a : Gcd(b, a % b); }
unsigned int C(int m, int n) {
  tmp.clear();
  for (int i = (1), iend = (m); i <= iend; i++) {
    tmp.push_back(n - i + 1);
  }
  for (int i = (1), iend = (m); i <= iend; i++) {
    int now = i;
    for (int j = (0), jend = ((int)tmp.size() - 1); j <= jend; j++) {
      int gcd = Gcd(tmp[j], now);
      tmp[j] /= gcd, now /= gcd;
    }
  }
  unsigned int res = 1;
  for (int i = (1), iend = (m); i <= iend; i++) res *= tmp[i - 1];
  return res;
}
unsigned int ksm(unsigned int num, unsigned int t) {
  unsigned int res = 1;
  for (; t; t >>= 1, num = num * num) {
    if (t & 1) res = num * res;
  }
  return res;
}
int main() {
  int n, p, q;
  scanf("%d%d%d", &n, &p, &q);
  for (int i = (0), iend = (min(p, n - 1)); i <= iend; i++) c[i] = C(i, n);
  unsigned int ans = 0;
  for (int i = (1), iend = (q); i <= iend; i++) {
    unsigned int tmp = 0;
    for (int j = (0), jend = (min(p, n - 1)); j <= jend; j++) {
      tmp += c[j] * ksm(i, j);
    }
    tmp *= i;
    ans ^= tmp;
  }
  cout << ans;
  return 0;
}
