N = gets.to_i a = gets.split(" ").map{|s| s.to_i} max = 0 s = 0 a.each {|x| s ^= x } s ^= s 0.upto(N-1) {|i| i.upto(N-1) {|j| x = s ^ a[i] ^ a[j] max = x if max < x } } puts max