n = int(eval(input()))

print((int(n/2) if n%2 == 0 else n//2+1))
print((-(-int(eval(input()))//2)))
n = int(eval(input()))
print((int(n / 2) if n % 2 == 0 else n // 2 + 1))

print((-(-int(eval(input())) // 2)))

-n = int(eval(input())) -print((int(n / 2) if n % 2 == 0 else n // 2 + 1)) +print((-(-int(eval(input())) // 2)))