import java.util.*; import java.io.*; import java.math.*; // import java.util.stream.Stream; class Main{ static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static PrintWriter output = new PrintWriter(System.out); static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws IOException{ int n = sc.nextInt(); long [] A = new long[n]; long OR = 0L; long answer = (long)1e18+1; for(int i=0;i>i) & 1; if(bit == 0) { output.println((1L<