#include <bits/stdc++.h>
using namespace std;
const long long inf = 4e18;
const long long maxp = 150;
const long long mod = 4294967296;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long calc_cnk(long long n, long long k) {
  if (n < k) return 0;
  if (k == 0) return 1;
  vector<long long> N;
  for (long long i = 0; i < k; i++) N.push_back(n - i);
  for (long long i = 1; i <= k; i++) {
    long long cop = i;
    for (long long j = 0; j < (N).size(); j++) {
      if (cop == 1) break;
      if (N[j] == 1) continue;
      long long g = gcd(N[j], cop);
      cop /= g;
      N[j] /= g;
    }
  }
  long long ans = 1;
  for (long long i = 0; i < (N).size(); i++) ans = (ans * N[i]) % mod;
  return ans;
}
long long cnk[maxp];
int main() {
  long long n, p, q;
  cin >> n >> p >> q;
  for (long long i = 0; i <= min(p, n - 1); i++) cnk[i] = calc_cnk(n, i);
  long long Ans = 0;
  for (long long i = 1; i <= q; i++) {
    long long ans = 0;
    long long tavan = 1;
    for (long long j = 0; j <= min(p, n - 1); j++) {
      ans += (tavan * cnk[j]);
      ans %= mod;
      tavan *= i;
      tavan %= mod;
    }
    ans = (ans * i) % mod;
    ans += mod;
    ans %= mod;
    Ans ^= ans;
  }
  cout << Ans;
}
