N = int(input()) print(-1 if N < 15 else N-7)