fn read() -> Vec { use std::io::Read; let mut s = String::new(); std::io::stdin().read_to_string(&mut s).unwrap(); let mut it = s.trim().split_whitespace(); let mut next = |l: usize, r: usize| -> usize { let v = it.next().unwrap().parse::().unwrap(); assert!(l <= v && v <= r); v }; let n = next(1, 100); let mut a = vec![0; n]; for a in a.iter_mut() { *a = next(1, 10usize.pow(18)); } a } fn main() { let a = read(); let shift = (0..).find(|k| a.iter().all(|a| *a >> k & 1 == 0)).unwrap(); let ans = 1usize << shift; println!("{}", ans); }