#include <bits/stdc++.h>
using namespace std;
long long ans, a, b, c, Ans, mod, C[10001], u[10001], y[10001];
long long gcd(long long qq, long long ww) {
  if (qq < ww) swap(qq, ww);
  if (!ww) {
    return qq;
  }
  return gcd(ww, qq % ww);
}
int main() {
  scanf("%lld%lld%lld", &a, &b, &c);
  b = min(b, a - 1);
  mod = pow(2, 32);
  C[0] = 1;
  for (int i = a; i >= a - b; i--) {
    long long ff = 1;
    for (int j = a; j >= i; j--) {
      u[a - j + 1] = j;
      y[a - j + 1] = a - j + 1;
    }
    for (int j = 1; j <= a - i + 1; j++) {
      for (int k = 1; k <= a - i + 1; k++) {
        long long gg = gcd(u[k], y[j]);
        u[k] /= gg;
        y[j] /= gg;
      }
    }
    for (int j = 1; j <= a - i + 1; j++) {
      ff *= u[j];
      ff %= mod;
    }
    C[a - i + 1] = ff;
  }
  for (int i = 1; i <= c; i++) {
    long long hh = 1;
    ans = 0;
    for (int j = 0; j <= b; j++) {
      hh *= i;
      hh %= mod;
      ans += hh * C[j] % mod;
      ans %= mod;
    }
    ans %= mod;
    ans += mod;
    ans %= mod;
    Ans ^= ans;
  }
  printf("%lld", Ans);
  return 0;
}
