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