A = int(input().strip()) print(-1 if A <= 7 else A - 7)