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