fn main() { let mut p = String::new(); std::io::stdin().read_line(&mut p).ok(); let p: usize = p.trim().parse().unwrap(); println!("{}", format!("{:b}", 2usize.pow(p as u32) - 1).chars().filter(|c| *c == '1').count()); }