import java.util.*;
 
 
// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
 
class TestClass {
    public static void main(String args[] ) throws Exception {
     
        Scanner s = new Scanner(System.in);
 
	int n=s.nextInt();
      int a[]=new int[n];
      
      System.out.println(findXor(a,n));
    }
static int findXor(int arr[], int n) 
    { 
      
        // Calculate xor of all the 
        // elements 
        int xoR = 0; 
        for (int i = 0; i < n; i++) { 
            xoR = xoR ^ arr[i]; 
        } 
      
        // Return twice of xor value 
        return xoR * 2; 
    }
}