let () =
  let a = read_int () in
  Printf.printf "%d\n" (if a < 15 then (-1) else a - 7)