#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << '\n'; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << ' ' << H;
  debug_out(T...);
}
const long long INF = 1e9;
const long long MOD = 1e9 + 7;
const unsigned int N = 2e2 + 5;
unsigned int CN[N];
unsigned int GCD(unsigned int a, unsigned int b) {
  return !b ? a : GCD(b, a % b);
}
unsigned int C(unsigned int n, unsigned int r) {
  if (r > n) return 0;
  vector<unsigned int> m;
  for (unsigned int i = 1; i <= r; i++) m.push_back(i);
  unsigned int ans = 1;
  for (unsigned int i = 0; i < r; i++) {
    unsigned int j = n - i;
    for (unsigned int &k : m) {
      unsigned int g = GCD(j, k);
      k /= g, j /= g;
    }
    ans *= j;
  }
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  unsigned int n, p, q;
  cin >> n >> p >> q;
  p = min(p, n - 1);
  for (unsigned int i = 0; i <= p; i++) CN[i] = C(n, i);
  unsigned int ans = 0;
  for (unsigned int d = 1; d <= q; d++) {
    unsigned int r = 0;
    for (unsigned int i = 0, pw = 1; i <= p; i++, pw *= d) r += CN[i] * pw;
    r *= d, ans ^= r;
  }
  cout << ans << '\n';
  return 0;
}
