fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let n = s.trim().parse::().unwrap(); println!("{}", if n > 14 { n - 7 } else { -1 }) }