fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n: u32 = s.trim().parse().unwrap(); println!("{}", std::cmp::max(n, 7 * n - 36)); }