codeforces#P1285D. Dr
Dr
Description
Today, as a friendship gift, Bakry gave Badawy integers and challenged him to choose an integer such that the value is minimum possible, where denotes the bitwise XOR operation.
As always, Badawy is too lazy, so you decided to help him and find the minimum possible value of .
The first line contains integer ().
The second line contains integers ().
Print one integer — the minimum possible value of .
Input
The first line contains integer ().
The second line contains integers ().
Output
Print one integer — the minimum possible value of .
Samples
Note
In the first sample, we can choose .
In the second sample, we can choose .