n = int(input()) print(n-7 if n > 14 else -1)