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