a = io.read("*n") if(a <= 14) then print(-1) else print(a - 7) end