let A = stdin.ReadLine() |> int if A >= 17 then A-7 elif A >= 15 then 10 - (17-A) else -1 |> printfn "%i"