def fun(n): if n % 2 == 0: return n // 2 return (n + 1) // 4 print(fun(int(input())))