#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, res;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int arr[n];
    cin >> arr[i];
    for (int j = i + 1; j < n - 1; j++) {
      res = arr[i] ^ arr[i + 1];
    }
  }
  cout << res << endl;
}
