#include <cstdio>

int main()
{
  freopen("excess.in", "r", stdin);
  freopen("excess.out", "w", stdout);

  int n, Xor = 0, a;
  scanf("%d", &n);
  while (n--)
    scanf("%d", &a), Xor ^= a;
  printf("%d\n", Xor);
  return 0;
}