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