#include<iostream>
using namespace std;
int find_data(int arr[], int size) {
int i = 0;
int data = arr[0];
for (i = 1; i < size; i++) {
data ^= arr[i];
}
return data;
}
int main()
{
int a[20];
int i=0;
char c;
while (scanf("%d", &a[i]) != EOF)
{
i++;
if (c = getchar() != ' ')break;
}
int data;
data = find_data(a,i);
cout << data << endl;
system("pause");
}