use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut n: u64 = s .split_whitespace() .skip(1) .flat_map(str::parse) .fold(0, |a, x: u64| a | x); let mut a = 1u64; while n & 1 == 1 { a *= 2; n >>= 1; } println!("{a}") }