#include <bits/stdc++.h>
using namespace std;
const int N = 233;
int n, p, q, cnt[N];
int ad(int first, int op) {
  for (int i = 2, iE = p; i <= iE; i++)
    while (first % i == 0) cnt[i] += op, first /= i;
  return first;
}
unsigned int ns, C[N], Ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p >> q, C[0] = 1, ns = 1, p = min(p, n - 1);
  for (int i = 1, iE = p; i <= iE; i++) {
    ns *= ad(n - i + 1, 1), ad(i, -1), C[i] = ns;
    for (int j = 2, jE = p; j <= jE; j++)
      for (int k = 1, kE = cnt[j]; k <= kE; k++) C[i] *= j;
  }
  for (int i = 1, iE = q; i <= iE; i++) {
    unsigned zzc = 0, now = 1;
    for (int j = 0, jE = p; j <= jE; j++) zzc += now * C[j], now *= i;
    Ans ^= zzc * i;
  }
  cout << Ans << "\n";
  return 0;
}
