def main(): A = int(input()) print(max(A - 7, -1)) main()