fn read_items() -> Vec where T: std::str::FromStr, ::Err: std::fmt::Debug, { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); return line .trim() .split(" ") .filter(|&s| s.len() > 0) .map(|s| s.parse::().unwrap()) .collect(); } fn main() { let n = read_items::()[0]; let mut ans = 1; while ans * 2 <= n { ans *= 2; } println!("{}", ans); }