#include<iostream>
#include<stdio.h>
using namespace std; int main()
{
int len;
while(cin>>len)
{
int ans;
len--;
cin>>ans;
while(len--)
{
int a;
cin>>a;
ans=ans^a; }
cout<<ans<<endl; } system("pause");
return 0; }
#include<iostream>
#include<stdio.h>
using namespace std; int main()
{
int len;
while(cin>>len)
{
int ans;
len--;
cin>>ans;
while(len--)
{
int a;
cin>>a;
ans=ans^a; }
cout<<ans<<endl; } system("pause");
return 0; }