n = int(eval(input()))



if n%2 == 0:

    a = n//2

else:

    a = n//2 + 1

print((int(a)))
N = int(eval(input()))

print((max(N//2, (N+1)//2)))
n = int(eval(input()))
if n % 2 == 0:
    a = n // 2
else:
    a = n // 2 + 1
print((int(a)))

N = int(eval(input()))
print((max(N // 2, (N + 1) // 2)))

-n = int(eval(input())) -if n % 2 == 0: -    a = n // 2 -else: -    a = n // 2 + 1 -print((int(a))) +N = int(eval(input())) +print((max(N // 2, (N + 1) // 2)))