A penguin Rocher has $n$ sticks. He has exactly one stick with length $i$ for all $1 \le i \le n$.

He can connect some sticks. If he connects two sticks that have lengths $a$ and $b$, he gets one stick with length $a + b$. Two sticks, that were used in the operation disappear from his set and the new connected stick appears in his set and can be used for the next connections.

He wants to create the maximum number of sticks that have the same length. It is not necessary to make all sticks have the same length, some sticks can have the other length. How many sticks with the equal length he can create?


-----Input-----

The input consists of multiple test cases. The first line contains a single integer $t$ ($1 \le t \le 1000$) — the number of test cases. Next $t$ lines contain descriptions of test cases.

For each test case, the only line contains a single integer $n$ ($1 \le n \le 10^{9}$).


-----Output-----

For each test case, print a single integer  — the answer to the problem.


-----Example-----
Input
4
1
2
3
4

Output
1
1
2
2



-----Note-----

In the third case, he can connect two sticks with lengths $1$ and $2$ and he will get one stick with length $3$. So, he will have two sticks with lengths $3$.

In the fourth case, he can connect two sticks with lengths $1$ and $3$ and he will get one stick with length $4$. After that, he will have three sticks with lengths $\{2, 4, 4\}$, so two sticks have the same length, and one stick has the other length.

Difficulty: EASY

Solutions:
for _ in range(int(input())):
	ans = 0
	n = int(input())
	ans = n // 2
	if n % 2 == 1:
		ans += 1
	print(ans)


n = int(input())
for i in range(n):
	a = int(input())
	if a == 1:
		print(1)
	elif a == 2:
		print(1)
	elif a == 3:
		print(2)
	elif a >= 4:
		if a % 2 == 0:
			print(a // 2)
		else:
			print((a - 1) // 2 + 1)


import math
for t in range(int(input())):
	N = int(input())
	if N % 2 == 0:
		print(N // 2)
	else:
		print(N // 2 + 1)


n = int(input())
for _ in range(n):
	print((int(input()) + 1) // 2)


import math
t = int(input())
while t:
	t -= 1
	n = int(input())
	print(math.ceil(n / 2))


tt = int(input())
while tt:
	tt -= 1
	n = int(input())
	import math
	m = math.ceil(n / 2)
	print(m)


for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


t = int(input())
for t in range(t):
	n = int(input())
	print((n + 1) // 2)


n = int(input())
arr = [int(input()) for _ in range(n)]

def solve(n):
	return (n + 1) // 2
for x in arr:
	print(solve(x))


import sys
input = sys.stdin.readline
T = int(input())
for testcase in range(T):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import math

def calc(n):
	if n == 1:
		return 1
	elif n == 2:
		return 1
	else:
		return math.ceil(n / 2)
for _ in range(int(input())):
	n = int(input())
	print(calc(n))


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	n = ri()
	print((n + 1) // 2)
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


for _ in range(int(input())):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 0:
		k = int((n - 2) / 2)
		print(k + 1)
	else:
		k = int((n - 1) / 2)
		print(k + 1)


import math
cases = int(input())
for _ in range(cases):
	n = int(input())
	ans = math.ceil(n / 2)
	print(ans)


for _ in ' ' * int(input()):
	n = int(input())
	print(n // 2 + n % 2)


for i in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		a = n // 2
		print(a + 1)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n == 1 or n == 2:
		print('1')
		continue
	if n == 3:
		print('2')
		continue
	else:
		print(math.ceil(n / 2))


import math
for _ in range(int(input())):
	ans = 1
	n = int(input())
	temp = math.ceil(n / 2)
	print(ans * temp)


import math

def read():
	return int(input())

def reads():
	return map(int, input().split())

def solve():
	n = read()
	print(math.ceil(n / 2))
t = int(input())
while t:
	solve()
	t -= 1


for i in range(int(input())):
	print((int(input()) + 1) // 2)


t = int(input())
while t != 0:
	ans = 0
	n = int(input())
	ans = int(n / 2)
	if n % 2 == 1:
		ans += 1
	print(ans)
	t -= 1


t = int(input())
for i in range(t):
	a = int(input())
	print((a - 1) // 2 + 1)


from sys import stdin, stdout
from collections import defaultdict as dd
from collections import Counter as ctr
from statistics import median
for t in range(int(stdin.readline().strip())):
	n = int(input())
	print((n + 1) // 2)


n = int(input())
while n != 0:
	n -= 1
	a = int(input())
	print(int((a - 1) / 2 + 1))


import math
from decimal import *
getcontext().prec = 30
n = int(input())
while n:
	n -= 1
	x = int(input())
	print((x + 1) // 2)


for i in range(int(input())):
	x = int(input())
	if x == 1:
		print(1)
	if x % 2 == 0:
		print(x // 2)
	if x != 1 and x % 2 != 0:
		print(x // 2 + 1)


t = int(input())
for q in range(0, t):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


try:
	k = int(input())
	for i in range(k):
		n = int(input())
		print((n - 1) // 2 + 1)
except:
	pass


import math as m
for i in range(int(input())):
	print(m.ceil(int(input()) / 2))


testcases = int(input())
for i in range(testcases):
	t = int(input())
	same_length = 1
	rest = t - 1
	same_length += rest // 2
	print(same_length)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def solve(t):
	ans = t % 2 + t // 2
	print(ans)
T = inp()
tests = []
for _ in range(T):
	tests.append(inp())
for t in tests:
	solve(t)


for test in range(0, int(input())):
	n = int(input())
	if n == 1:
		print(1)
	else:
		print((n + 1) // 2)


z = int(input())
for h in range(z):
	n = int(input())
	ans = (n - 1) // 2 + 1
	print(ans)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(int(math.ceil(n / 2)))


z = int(input())
s = 0
y = 0
m = []
for x in range(z):
	n = int(input())
	if n == 1:
		print(1)
	else:
		print(int((n - 1) / 2) + 1)


import sys
import math
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	n = int(input())
	print(math.ceil(n / 2))


t = int(input())
while t:
	n = int(input())
	print((n - 1) // 2 + 1)
	t -= 1


from sys import stdin, stdout

class SOLVE:

	def solve(self):
		R = stdin.readline
		W = stdout.write
		ans = []
		for i in range(int(R())):
			n = int(R())
			ans.append(str(n // 2 + n % 2))
		W('\n'.join(ans))

def main():
	s = SOLVE()
	s.solve()
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math
t = int(input())
for _ in range(t):
	n = int(input())
	print(math.ceil(n / 2))


n = int(input())
for i in range(n):
	k = int(input())
	if k % 2 == 1:
		print((k + 1) // 2)
	else:
		print(k // 2)


from sys import stdin, stdout
input = stdin.readline
print = stdout.write
for _ in range(int(input())):
	n = int(input())
	print(str((n + 1) // 2) + '\n')


n = int(input())
numbers = []
for i in range(n):
	number = int(input())
	numbers.append(number)
for number in numbers:
	print(int((number + 1) / 2))


import math
t = int(input())
for _ in range(t):
	n = int(input())
	print(1 if n == 1 else math.ceil(n / 2))


from math import ceil
t = int(input())
for _ in range(t):
	n = int(input())
	print(ceil(n / 2))


t = int(input())
while t:
	t -= 1
	n = int(input())
	if n < 3:
		print(1)
	elif n == 3 or n == 4:
		print(2)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import math
t = int(input())
for q in range(t):
	n = int(input())
	print(math.ceil(n / 2))


from math import ceil
for _ in range(int(input())):
	x = int(input())
	if x == 1:
		print(1)
	elif x == 3:
		print(2)
	else:
		print(ceil(x / 2))


t = input()
t = int(t)
i = 0
while i < t:
	n = int(input())
	if n % 2 == 0:
		n = n / 2
	else:
		n = (n + 1) / 2
	n = int(n)
	print(n)
	i += 1


k = int(input())
arr = []
for i in range(k):
	arr.append(int(input()))

def f1(x):
	if x % 2:
		print(int(x / 2) + 1)
	else:
		print(int(x / 2))
list(map(f1, arr))


def solve(n):
	return (n + 1) / 2
t = int(input())
results = list()
for i in range(0, t):
	n = int(input())
	results.append(int(solve(n)))
for result in results:
	print(result)


test = int(input())
for i in range(0, test):
	n = int(input())
	print((1 + n) // 2)


import math

def dtod(a):
	s = ''
	while a != 0:
		s += str(a % 2)
		a = int(a / 2)
	return s[::-1]
n = int(input())
for i in range(n):
	a = int(input())
	print(int((a + 1) / 2))


t = int(input())
for _ in range(t):
	n = int(input())
	if n > 2:
		print((n + 1) // 2)
	else:
		print(1)


def func(n):
	return (n + 1) // 2

def main():
	t = int(input())
	t_input = [int(input()) for i in range(t)]
	for i in list(map(func, t_input)):
		print(i)
main()


t = int(input())
while t != 0:
	t = t - 1
	x = int(input())
	print((x + 1) // 2)


n = int(input())
for _ in range(n):
	t = int(input())
	print((t + t % 2) // 2)


myli = []
t = int(input())
if 1 <= t <= 1000:
	for i in range(t):
		n = int(input())
		if 1 <= n <= 10 ** 9:
			myli.insert(i, n)
		else:
			exit()
	for x in myli:
		if x == 1 or x == 2:
			print('1')
		elif x % 2 == 0:
			print(int(x / 2))
		else:
			print(int((x + 1) / 2))
else:
	exit()


num = int(input())
for i in range(num):
	t = int(input())
	print((t + 1) // 2)


for _ in range(int(input())):
	a = int(input())
	if a % 2 == 1:
		print(1 + a // 2)
	else:
		print(a // 2)


t = int(input())
for i in range(t):
	n = int(input())
	if n == 1 or n == 2:
		print('1')
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import sys
import math
import heapq
from collections import defaultdict, deque
input = sys.stdin.readline

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	n = r()
	if n & 1:
		print((n - 1) // 2 + 1)
	else:
		print(n // 2)


t = int(input())
res = []
for i in range(t):
	n = int(input())
	res.append(n // 2 + n % 2)
for r in res:
	print(r)


for tc in range(int(input())):
	a = int(input())
	print((a + 1) // 2)


def f():
	n = int(input(''))
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)
n = int(input(''))
for i in range(n):
	f()


import io, os
from collections import deque
RL = lambda : list(map(int, input().split(' ')))
T = int(input())
for _ in range(T):
	n = int(input())
	if n % 2:
		print((n - 1) // 2 + 1)
	else:
		print(n // 2)


import math
t = int(input())
for _ in range(t):
	n = int(input())
	count = 0
	if n == 1 or n == 2:
		print(1)
	else:
		if n % 2 == 0:
			count = n // 2
		else:
			count = math.ceil(n / 2)
		print(count)


t = int(input())
for i in range(t):
	n = int(input())
	k = n % 2
	r = n // 2
	if k == 0:
		print(r)
	else:
		print(r + 1)


t = int(input())
for i in range(t):
	x = int(input())
	if x == 1:
		print(1)
	elif x == 3:
		print(2)
	else:
		print((x + 1) // 2)


test_case = int(input())
while test_case:
	n = int(input())
	print((n + 1) // 2)
	test_case -= 1


tests = int(input())
for test in range(tests):
	n = int(input())
	ans = n // 2 + n % 2
	print(ans)


x = int(input())
for i in range(x):
	y = int(input())
	if y % 2 == 0:
		print(y // 2)
	else:
		print(y // 2 + 1)


t = int(input())
for count in range(t):
	n = int(input())
	if n == 1:
		print(1)
		continue
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


from math import *
from copy import *
from string import *
from random import *
from sys import stdin, stdout
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math
import math
import time
from queue import Queue

def seive(n):
	l = [True]
	l = l * (n + 1)
	for i in range(2, int(sqrt(n)) + 1):
		if l[i] == True:
			val = i * i
			while val < len(l):
				l[val] = False
				val += i
	prime = []
	for i in range(2, len(l)):
		if l[i] == True:
			prime.append(i)
	return prime

def dp(l, i, n, val, ans):
	if i >= n or val < 0:
		return 1000000
	elif val == 0:
		return 0
	else:
		if ans[i] == 1000000:
			ans[i] = min(min(1 + dp(l, i + 1, n, val - l[i], ans), 1 + dp(l, i, n, val - l[i], ans)), dp(l, i + 1, n, val, ans))
		return ans[i]
from queue import Queue

def factors(n):
	l = []
	for i in range(1, int(sqrt(n)) + 1):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def check1(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v -= 1

def check2(s, v, x):
	while True:
		if v not in s:
			return v
		else:
			v += 1

def up(n):
	j = n - 1
	while j > 0:
		if n % j == 0:
			break
		j -= 1
	return j
t = int(input())
for i in range(t):
	n = int(input())
	print(int(math.ceil(n / 2)))


for _ in range(int(input())):
	n = int(input())
	ans = n >> 1
	if n & 1:
		ans += 1
	print(ans)


t = int(input())
while t:
	n = int(input())
	if n % 2:
		res = int(n / 2) + 1
	else:
		res = int(n / 2)
	print(res)
	t -= 1


import math
T = int(input())
for t in range(T):
	n = int(input())
	targetLength = n
	print(int((n - 1) / 2) + 1)


w = []
t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 0:
		w.append(n // 2)
	else:
		w.append(n // 2 + 1)
for i in w:
	print(i)


def sol():
	n = int(input())
	print(n - n // 2)
try:
	for _ in range(int(input())):
		sol()
except:
	pass


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


t = int(input())
for i in range(t):
	s = int(input())
	if s % 2 == 0:
		print(s // 2)
	else:
		print((s - 1) // 2 + 1)


from bisect import insort_right, insort_left, bisect_left, bisect_right
from heapq import heapify, heappop, heappush
t = int(input())
while t:
	t -= 1
	n = int(input())
	print((n + 1) // 2)


t = int(input())
for i in range(t):
	n = int(input())
	print(1 + (n - 1) // 2, end='\n')


T = int(input())
for t in range(T):
	n = int(input())
	if n % 2 == 1:
		print((n + 1) // 2)
	else:
		print(round(n / 2))


for cases in range(int(input())):
	n = int(input())
	if n & 1:
		print((n - 1) // 2 + 1)
	else:
		print(n // 2)


from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')

def solve():
	for _ in range(ii()):
		n = ii()
		print(ceil(n / 2))
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = sys.stdin.readline
solve()


t = int(input())
while t > 0:
	x = int(input())
	p = int(x / 2)
	if x % 2 != 0:
		p = p + 1
	print(p)
	t = t - 1


for _ in range(int(input())):
	l = int(input()) - 1
	if l > 1:
		print(l // 2 + 1)
	else:
		print(1)


for i in range(int(input())):
	n = int(input())
	print(n // 2 + n % 2)


N_SETS = int(input())
for i in range(N_SETS):
	x = int(input())
	print(x // 2 + x % 2)


import math

def check(t, h, c, n):
	return abs(t - (n * (h + c) - c) / (2 * n - 1))
li = []

def fact(n):
	sumy = n
	a = 1
	b = n
	for i in range(1, int(n ** (1 / 2)) + 1):
		if n % i == 0 and sumy > i + n / i:
			a = i
			b = n // i
			sumy = a + b
	if b == n:
		li.append(b)
		return
	fact(a)
	fact(b)

def solution():
	n = int(input())
	print(math.ceil(n / 2))
for _ in range(int(input())):
	solution()


n = input()
for i in range(int(n)):
	x = int(input())
	print(((x + (x + 1)) // 2 + 1) // 2)


import sys
import math

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	n = I()
	n = n + 1
	print(n // 2)
for _ in range(I()):
	solve()


for x in range(int(input())):
	print((int(input()) + 1) // 2)


from __future__ import division, print_function

def get_ints():
	return map(int, input().strip().split())

def get_array():
	return list(map(int, input().strip().split()))
mod = 1000000007

def main():
	for _ in range(int(input())):
		n = int(input())
		s = n * (n + 1) // 2
		print(s // n)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	print((n + 1) // 2)


import math
T = int(input())
for _ in range(T):
	n = int(input())
	print(math.ceil(n / 2))


import sys
input = lambda : sys.stdin.readline().strip('\r\n')
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2:
		print(n // 2 + 1)
	else:
		print(n // 2)


for test in range(int(input())):
	n = int(input())
	print((n + 1) // 2)


import sys
input = sys.stdin.buffer.readline
a = int(input())
for x in range(a):
	b = int(input())
	if b == 1 or b == 2:
		print(1)
	elif b == 3:
		print(2)
	elif b % 2 == 0:
		print(b // 2)
	else:
		print(b // 2 + 1)


for s in [*open(0)][1:]:
	print(0 - -int(s) // 2)


zz = []
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		zz.append(n // 2)
	else:
		zz.append(n // 2 + 1)
for i in zz:
	print(i)


def solve():
	n = int(input())
	return (n + 1) // 2

def main():
	t = int(input())
	for i in range(t):
		print(solve())
main()


import math

def solve():
	n = int(input())
	print(int(math.ceil(n / 2)))
t = int(input())
for _ in range(t):
	solve()


from math import ceil
t1 = int(input())
for i in range(t1):
	n = int(input())
	print(ceil(n / 2))


import math
for i in range(0, int(input())):
	n = int(input())
	print(math.ceil(n / 2))


t = int(input())
a = []
for i in range(t):
	a.append(int(input()))
res = []
for i in range(t):
	if a[i] % 2 == 0:
		res.append(a[i] / 2)
	else:
		res.append(1 + (a[i] - 1) / 2)
for i in range(t):
	print(int(res[i]))


from math import ceil
t = int(input())
ans = []
while t:
	n = int(input())
	ans.append(ceil(n / 2))
	t -= 1
for i in range(len(ans)):
	print(ans[i])


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	if n == 1:
		ans.append(1)
		continue
	if n == 2:
		ans.append(1)
		continue
	if n % 2 == 0:
		ans.append(n // 2)
	else:
		ans.append(n // 2 + 1)
for an in ans:
	print(an)


for _ in range(int(input())):
	n = int(input())
	if n == 3:
		print(2)
		continue
	print(max(n // 2 + n % 2, 1))


def func(a):
	if a < 3:
		print(1)
		return
	elif a % 2 == 0:
		print(a // 2)
		return
	else:
		print(a // 2 + 1)
		return
t = int(input())
for _ in range(t):
	a = int(input())
	func(a)


n = int(input())
for _ in range(n):
	a = int(input())
	if a % 2 != 0:
		count = (a - 1) // 2 + 1
	else:
		count = a // 2
	print(count)


import sys
input = sys.stdin.readline
ans = []
for i in range(int(input())):
	n = int(input())
	ans.append(n // 2 + n % 2)
print(*ans, sep='\n')


N = int(input())
for i in range(0, N):
	x = int(input())
	print((x + 1) // 2)


for _ in range(int(input())):
	a = int(input())
	print((a + 1) // 2)


for _ in range(int(input())):
	x = int(input())
	if x <= 2:
		print(1)
	else:
		print((x - 1) // 2 + 1)


for T in range(int(input())):
	n = int(input())
	ans = 0
	if n == 1:
		ans = 1
	elif n == 2:
		ans = 1
	elif n % 2 == 0:
		ans = n // 2
	else:
		ans = n // 2 + 1
	print(ans)


N = int(input())
i = 0
while i < N:
	n = int(input())
	print((n + 1) // 2)
	i += 1


import sys
from math import ceil
input = sys.stdin.readline
output = sys.stdout.write

def main():
	qmars = int(input().rstrip())
	for i in range(qmars):
		num = int(input().rstrip())
		ans = ceil(num / 2)
		output(str(ans))
		output('\n')
main()


case = int(input())
for i in range(case):
	num = int(input())
	if num % 2 == 0:
		print(int(num / 2))
	else:
		print(int(num / 2 + 1))


for _ in range(int(input())):
	n = int(input())
	count = 1
	if n != 1 and n != 2:
		if (n - 1) % 2 == 1:
			count += (n - 1) // 2
		elif (n - 1) % 2 == 0:
			count += (n - 1) // 2
	print(count)


s = []
for iii in range(int(input())):
	n = int(input())
	s.append((n + n % 2) // 2)
for i in s:
	print(i)


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


def main():
	t = int(input())
	out = []
	for _ in range(t):
		n = int(input())
		out.append(str(n // 2 + n % 2))
	print('\n'.join(out))
main()


import sys
input = lambda : sys.stdin.readline()
for _ in range(int(input())):
	print((int(input()) + 1) // 2)


for test_i in range(int(input())):
	print((int(input()) + 1) // 2)


import math
t = int(input())
for i in range(t):
	n = int(input())
	print(int(n / 2) + n % 2)


t = int(input())
for _ in range(t):
	n = int(input())
	m = (n - 1) // 2 + 1
	ans = max(1, m)
	print(ans)


import math
scan = input
tests = int(scan())
for _ in range(tests):
	test = int(scan())
	print(math.ceil(test / 2))


t = int(input())
for i in range(t):
	x = int(input())
	if x == 1:
		print(1)
		continue
	if x % 2 == 1:
		print((x + 1) // 2)
	else:
		print(x // 2)


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	n = sInt()
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	n = int(input())
	print((n + 1) // 2)


for _ in range(int(input())):
	x = int(input())
	if x % 2 == 0:
		print(x // 2)
		continue
	t = (x - 1) // 2 + 1
	print(t)


t = int(input())
n = []
for i in range(t):
	num = int(input())
	n.append(num)
for j in range(t):
	if n[j] == 1 or n[j] == 2:
		ans = 1
	elif n[j] % 2 != 0:
		ans = int(n[j] / 2) + 1
	else:
		ans = int(n[j] / 2)
	print(ans)


from sys import stdin
input = stdin.readline

def main():
	test = int(input())
	for _ in range(test):
		n = int(input())
		if n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
main()


import math

def function(n):
	return math.ceil(n / 2)
t = int(input())
for i in range(t):
	n = int(input())
	print(function(n))


exec(int(input()) * 'print((int(input())+1)//2);')


import math

def ques1(n):
	print(math.ceil(n / 2))
t = int(input())
for i in range(t):
	n = int(input())
	ans = ques1(n)
	ans


for i in range(int(input())):
	n = int(input())
	count = 0
	if n // 2 == 0:
		count = 1
	elif n % 2 == 0:
		count = n // 2
	else:
		count = n // 2 + 1
	print(count)


import sys
input = sys.stdin.buffer.readline
from math import *
t = int(input())
while t:
	t -= 1
	n = int(input())
	print(int(ceil(n / 2)))


from math import ceil

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		print(ceil(n / 2))
main()


def func(A):
	return 1 + (A - 1) // 2
t = int(input())
for i in range(t):
	n = int(input())
	print(func(n))


from sys import stdin, stdout
import math
input = stdin.readline

def print(x='', y='', end='\n'):
	if y == '':
		stdout.write(str(x) + end)
	else:
		stdout.write(str(x) + ' ' + str(y) + end)

def solve():
	n = int(input())
	print(math.ceil(n / 2))
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


import sys
input = sys.stdin.buffer.readline

def solution():
	for _ in range(int(input())):
		n = int(input())
		print(n - n // 2)
solution()


a = int(input(''))
for b in range(0, a):
	b = int(input(''))
	if b % 2 == 0:
		print(b // 2)
	else:
		print(b // 2 + 1)


from math import ceil, log, floor, sqrt
import math

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def find_k(x, y, n):
	return (n - y) // x * x + y

def count_sticks(n):
	if n % 2 == 0:
		return n // 2
	return n // 2 + 1
t = 1
t = int(input())
while t:
	t = t - 1
	n = int(input())
	print(count_sticks(n))


import math
t = int(input())
while t != 0:
	n = int(input())
	if n == 3:
		print(2)
	elif n == 1:
		print(1)
	else:
		print(math.ceil(n / 2))
	t -= 1


import math
for i in range(int(input())):
	a = int(input())
	if a % 2 != 0:
		print(a // 2 + 1)
	else:
		print(a // 2)


T = int(input())
for t in range(T):
	n = int(input())
	if n % 2 == 0:
		print(int(n / 2))
	elif n == 1:
		print(1)
	elif n == 3:
		print(2)
	else:
		print(int(n // 2 + 1))


s = int(input())
for a in range(s):
	h = int(input())
	print((h + 1) // 2)


t = int(input())
for _ in range(t):
	n = int(input())
	print(sum(divmod(n, 2)))


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	for _ in range(int(input())):
		n = int(input())
		if not n & 1:
			print(n // 2)
		else:
			print((n + 1) // 2)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


T = int(input())
for _ in range(T):
	n = int(input())
	ans = (n - 1) // 2 + 1
	print(ans)


t = int(input())
for i in range(0, t):
	n = int(input())
	if n % 2 == 0:
		print(int(n / 2))
	else:
		print(int(n / 2 + 0.5))


n = int(input())
l = []
while n:
	x = int(input())
	if x % 2 == 0:
		l.append(x // 2)
	else:
		l.append(x // 2 + 1)
	n = n - 1
for j in l:
	print(j)


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


from collections import Counter
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
import math

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def divs(n, start=2):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors
import sys
for i in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 != 0:
		print(n // 2 + 1)
	else:
		print(n // 2)


def single():
	return int(input())

def multiple():
	return list(map(int, input().split()))
t = single()
for i in range(t):
	num = single()
	if num % 2:
		print((num + 1) // 2)
	else:
		print(num // 2)


from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return [list(x) for x in sys.stdin.readline().split()]

def S():
	res = list(sys.stdin.readline())
	if res[-1] == '\n':
		return res[:-1]
	return res

def IR(n):
	return [I() for i in range(n)]

def LIR(n):
	return [LI() for i in range(n)]

def SR(n):
	return [S() for i in range(n)]

def LSR(n):
	return [LS() for i in range(n)]
sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
	t = I()
	for _ in range(t):
		n = I()
		print(n + 1 >> 1)
	return
solve()


mod = 1000000007
eps = 10 ** (-9)

def main():
	import sys
	input = sys.stdin.readline
	for _ in range(int(input())):
		N = int(input())
		print((N - 1) // 2 + 1)
main()


def solve():
	pass

def read():
	t = int(input())
	for i in range(t):
		n = int(input())
		ans = 1 + (n - 1) // 2
		print(ans)
read()


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		ans = 0
		if n % 2:
			ans = 1
			n -= 1
		print(ans + n // 2)
	return
main()


import math
t = int(input())
for k in range(t):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	else:
		print(int(math.ceil(n - n / 2)))


t = int(input())
for i in range(t):
	n = int(input())
	ans = int((n - 1) / 2) + 1
	print(ans)


import math
t = int(input())
nums = []
for i in range(t):
	nums.append(int(input()))
output = []
counter = 1
for n in nums:
	if n == 1 or n == 2:
		output.append(1)
	else:
		output.append(math.ceil(n / 2))
for x in output:
	print(x)


x = int(input())
while x:
	x -= 1
	a = int(input())
	if a % 2 == 0:
		print(a // 2)
	else:
		print((a + 1) // 2)


for ti in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


t = int(input())

def rec(mn, ind, l, b, dp):
	if ind == 0:
		return 0
	else:
		if dp[ind - 1] == 0:
			if mn[ind - 1][0] < l and mn[ind - 1][1] < b:
				dp[ind - 1] = max(rec(mn, ind - 1, l, b, dp), mn[ind - 1][2] + rec(mn, ind - 1, mn[ind - 1][0], mn[ind - 1][1], dp))
			else:
				dp[ind - 1] = rec(mn, ind - 1, l, b, dp)
		return dp[ind - 1]
for _ in range(t):
	n = int(input())
	ans = n // 2
	if n % 2 == 0:
		print(ans)
	else:
		print(ans + 1)


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	n = II()
	print((n + 1) // 2)


def solve():
	global N
	return (N + 1) // 2
for _ in range(int(input())):
	N = int(input())
	sol = solve()
	print(sol)


a = int(input())
for i in range(0, a):
	b = int(input())
	print((b - 1) // 2 + 1)


from sys import stdin
from bisect import bisect_left as bl
from bisect import bisect_right as br

def input():
	return stdin.readline()[:-1]

def intput():
	return int(input())

def sinput():
	return input().split()

def intsput():
	return map(int, sinput())

class RangedList:

	def __init__(self, start, stop, val=0):
		self.shift = 0 - start
		self.start = start
		self.stop = stop
		self.list = [val] * (stop - start)

	def __setitem__(self, key, value):
		self.list[key + self.shift] = value

	def __getitem__(self, key):
		return self.list[key + self.shift]

	def __repr__(self):
		return str(self.list)

	def __iter__(self):
		return iter(self.list)

def dprint(*args, **kwargs):
	if debugging:
		print(*args, **kwargs)
debugging = 1
t = intput()
for _ in range(t):
	n = intput()
	print((n - 1) // 2 + 1)


import math, sys

def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')

def get_array():
	l = list(map(int, input().split()))
	return l

def main():
	for _ in range(int(input())):
		n = int(input())
		if n % 2 == 0:
			print(n // 2)
		else:
			print((n + 1) // 2)
main()


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	if n % 2 != 0:
		print(n // 2 + 1)
	else:
		print(n // 2)


test = int(input())
while test:
	n = int(input())
	print((n + 1) // 2)
	test -= 1


from math import floor, ceil
t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 1:
		ans = ceil(n / 2)
	else:
		ans = floor(n / 2)
	print(ans)


import math
for c in range(int(input())):
	a = int(input())
	print(math.ceil(a / 2))


for case_num in range(int(input())):
	k = int(input())
	print((k + 1) // 2)


from math import *
t = int(input())
i = 0
while i < t:
	n = int(input())
	r = floor(n / 2)
	if n % 2 == 0:
		print(r)
	else:
		print(r + 1)
	i += 1


t = int(input())
t1 = 0
while t1 < t:
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print((n + 1) // 2)
	t1 = t1 + 1


def main():
	n = int(input())
	if n < 3:
		return 1
	return (n - 1) // 2 + 1
t = int(input())
for _ in range(t):
	print(main())


from sys import stdout, stdin
import io
import os
input = stdin.readline
for t in range(int(input())):
	n = int(input())
	print(n // 2 + n % 2)


from sys import stdin
input = stdin.readline
import bisect
import math
for xoxo in range(1):
	for _ in range(int(input())):
		n = int(input())
		print((n - 1) // 2 + 1)


T = int(input())
for i in range(T):
	N = int(input())
	if N == 1 or N == 2:
		print(1)
	else:
		a = N // 2
		if N & 1 == 0:
			print(a)
		else:
			print(a + 1)


import math
import sys
t = int(input())
for ii in range(t):
	n = int(input())
	print(math.ceil(n / 2))


t = int(input())
for i in range(t):
	n = int(input())
	if n >= 3:
		if n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
	else:
		print(1)


def magical_sticks(n):
	if n % 2:
		ans = n // 2 + 1
	else:
		ans = n // 2
	return ans
t = int(input())
for _ in range(t):
	n = int(input())
	print(magical_sticks(n))


from math import ceil
case = int(input())
for _ in range(case):
	print(ceil(int(input()) / 2))


def solve():
	t = int(input())
	ar = []
	for i in range(t):
		n = int(input())
		ans = n // 2
		if n % 2 != 0:
			ans += 1
		print(ans)
result = solve()


import sys
import math
k = int(input())
i = 0
while i < k:
	print(math.ceil(int(input()) / 2), flush=True)
	i += 1


f = int(input())
for q in range(f):
	n = int(input())
	print(n // 2 + int(n % 2 != 0))


t = int(input())
for _ in range(t):
	x = int(input())
	print((x + 1) // 2 + 1 - 1)


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt, log2, floor
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	maxint = 10 ** 10
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def countSetBits(n):
	count = 0
	while n:
		n &= n - 1
		count += 1
	return count

def solve():
	n = int(input())
	if n == 1 or n == 2:
		print(1)
		return
	print((n - 1) // 2 + 1)
t = 1
t = int(input())
for _ in range(t):
	solve()


import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def li():
	return [int(x) for x in input().split()]

def gi():
	return [x for x in input().split()]

def fi():
	return int(input())

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
while t > 0:
	t -= 1
	n = fi()
	print((n + 1) // 2)


tc = int(input())
for _ in range(tc):
	n = int(input())
	n += 1
	print(n // 2)
	if n == 69420:
		print('bing bong')
		print(7555)


def task_A():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print((n - 1) // 2 + 1)

def main():
	task_A()
main()


for _ in range(int(input())):
	print(-(-int(input()) // 2))


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inps():
	return str(input())

def inlt():
	return list(map(int, input().split()))

def inlst():
	return list(map(str, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
t = inp()
arr = []
for i in range(t):
	arr.append(inp())
for a in arr:
	if a % 2:
		print(int((a + 1) / 2))
	else:
		print(int(a / 2))


def countSticks(n):
	(start, end) = (1, n - 1)
	counter = 1
	while start + end == n and start < end and (end > start):
		counter += 1
		(start, end) = (start + 1, end - 1)
	return counter

def shortcut(n):
	if n % 2 == 0:
		return n // 2
	else:
		return n // 2 + 1
t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


try:
	t = int(input())
	while t:
		n = int(input())
		if n % 2 == 0:
			print(n // 2)
		else:
			print((n + 1) // 2)
		t -= 1
except:
	pass


t = int(input())
liste = []
for loop in range(1, t + 1):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


def ans(n):
	if n % 2 == 0:
		return n // 2
	return n // 2 + 1
m = int(input())
for i in range(m):
	n = int(input())
	print(ans(n))


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	else:
		a = n - 1
		b = a // 2
		print(b + 1)


t = input()
o = []
for i in range(int(t)):
	a = int(input())
	x = int((a - 1) / 2) + 1
	o.append(x)
for i in list(o):
	print(i)


import math

def isPrimes2(n):
	if n > 1:
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		for x in range(3, int(math.sqrt(n) + 1), 2):
			if n % x == 0:
				return False
		return True
	return False

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n == 1:
			print(1)
		elif n == 2:
			print(1)
		elif n == 3:
			print(2)
		elif n % 2 == 0:
			print(n // 2)
		else:
			print(int((n - 1) // 2 + 1))
main()


n = int(input())
a = []
for i in range(0, n):
	new = int(input())
	if new % 2 == 0:
		a.append(int(new / 2))
	else:
		a.append(int((new - 1) / 2) + 1)
for s in range(0, n):
	print(a[s])


t = int(input())
while t > 0:
	n = int(input().strip())
	print((n - 1) // 2 + 1)
	t -= 1


for t in range(int(input())):
	k = int(input())
	print((k + 1) // 2)


import math
for _t in range(int(input())):
	n = int(input())
	print(math.ceil(n / 2))


for i in range(int(input())):
	x = int(input())
	if x % 2 == 0:
		print(x // 2)
	else:
		print('%0.f' % (x / 2 + 0.5))


t = int(input())
l = []
for i in range(t):
	n = int(input())
	l.append(int((n - 1) / 2) + 1)
for number in l:
	print(number)


def solve(n: int):
	return n // 2 + n % 2
caseSize = input()
caseSize = int(caseSize)
while caseSize > 0:
	caseSize -= 1
	n = int(input())
	print(solve(n))


T = int(input())
while T:
	n = int(input())
	print((n + 1) // 2)
	T = T - 1


import math as m
t = int(input())
for _ in range(t):
	n = int(input())
	print(m.ceil(n / 2))


n = int(input())
tests = [int(input()) for _ in range(n)]
for i in tests:
	if i % 2 == 0:
		print(i // 2)
	else:
		print(i // 2 + 1)


def algo(n):
	if n == 1:
		return 1
	if n == 2:
		return 1
	m = (n - 1) // 2
	return m + 1
for _ in range(int(input())):
	n = int(input())
	result = algo(n)
	print(result)


inp = int(input())
for x in range(inp):
	inp1 = int(input())
	if inp1 % 2 == 0:
		print(int(inp1 / 2))
	else:
		print(int(inp1 / 2) + 1)


from math import ceil
t = int(input())
while t != 0:
	t = t - 1
	n = int(input())
	print(ceil(n / 2))


import math
for t in range(int(input())):
	print(math.ceil(int(input()) / 2))


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		if n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
main()


tc = int(input())
while tc:
	tc -= 1
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	else:
		print((n - 1) // 2 + 1)


n = int(input())
while n:
	x = int(input())
	ans = 0
	ans = x // 2
	if x % 2 == 1:
		ans += 1
	print(ans)
	n -= 1


from math import floor

def solve(n):
	stick_length = floor((n + 1) / 2)
	return stick_length
t = int(input(''))
cases = []
for i in range(t):
	cases.append(int(input('')))
for case in cases:
	print(solve(case))


import math
test = int(input())
for t in range(test):
	n = int(input())
	ans = math.ceil(n / 2)
	print(ans)


import math
t = int(input())

def ans(x):
	print(math.ceil(x / 2))
for i in range(t):
	x = int(input())
	ans(x)


import sys
import math

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
t = int(input())
for test in range(t):
	n = int(input())
	if n % 2 == 1:
		print((n + 1) // 2)
	else:
		print(n // 2)


a = int(input())
z = []
for i in range(a):
	b = int(input())
	print((b + 1) // 2)


tt = int(input())
for loop in range(tt):
	n = int(input())
	print((n + 1) // 2)


number = int(input())
for i in range(number):
	n = int(input())
	print(int((n + 1) // 2))


import sys
lines = sys.stdin.readlines()
T = int(lines[0].strip())
for i in range(T):
	n = int(lines[i + 1].strip())
	print((n + 1) // 2)


nb_cases = int(input())
for case in range(nb_cases):
	n = int(input())
	print((n + 1) // 2)


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())
for case in range(itg()):
	print((itg() + 1) // 2)


def dtb(n):
	return bin(n).replace('0b', '')

def btd(n):
	return int(n, 2)
t = int(input())
for k in range(t):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import sys
from heapq import *
input = sys.stdin.readline
f = lambda : list(map(int, input().strip('\n').split()))
res = []
for i in range(int(input())):
	n = int(input())
	res.append(n // 2 if not n % 2 else n // 2 + 1)
print('\n'.join(map(str, res)))


from collections import Counter, defaultdict, deque
import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	if n % 2:
		print(n // 2 + 1)
	else:
		print(n // 2)
tt = int(input())
for test in range(tt):
	solve()


from sys import stdin
from math import ceil

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
t = iinput()
while t:
	t -= 1
	n = iinput()
	print(ceil(n / 2))


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	n = int(input())
	print((n + 1) // 2)

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


t = int(input())
out = []
for i in range(0, t):
	j = int(input())
	if j < 3:
		out.append(1)
	else:
		out.append(int((j - 1) / 2) + 1)
for j in out:
	print(j)


import sys
input = sys.stdin.readline
inputr = lambda : sys.stdin.readline().rstrip('\n')
for _ in range(int(input())):
	n = int(input())
	print(max(1, (n + 1) // 2))


import math
for xyz in range(0, int(input())):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	else:
		print(math.ceil(n / 2))


a = eval(input(''))
for i in range(a):
	h = eval(input(''))
	print((h + 1) // 2)


from math import ceil
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		print(ceil(n / 2))
	if n % 2 == 0:
		print(n // 2)


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
mod = 1000000007

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())

def printIn(ob):
	return stdout.write(str(ob) + '\n')

def powerLL(n, p):
	result = 1
	while p:
		if p & 1:
			result = result * n % mod
		p = int(p / 2)
		n = n * n % mod
	return result

def myCode():
	n = I()
	res = math.ceil(n / 2)
	print(int(res))

def main():
	for t in range(I()):
		myCode()
main()


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	print(n // 2 + (1 if n % 2 else 0))


from sys import stdin
import math
n = int(stdin.readline())
for _ in range(n):
	c = int(stdin.readline().rstrip())
	if c == 1:
		print(1)
	else:
		print(math.ceil(c / 2))


from sys import stdin, stdout
import math
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	total = n * (n + 1) // 2
	print(total // n)


t = int(input())
for z in range(t):
	a = int(input())
	print((a + 1) // 2)


for _ in range(int(input())):
	K = int(input())
	if K > 1:
		if K % 2 == 0:
			print(K // 2)
		else:
			print(K // 2 + 1)
	else:
		print('1')


t = int(input())
for r in range(t):
	k = int(input())
	w = (k - 1) // 2 + 1
	print(w)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n % 2 == 1:
		print(n // 2 + 1, sep='', end='\n')
	else:
		print(n // 2)


from sys import stdin, stdout

def main():
	t = int(stdin.readline())
	for case in range(t):
		n = int(stdin.readline())
		if n <= 2:
			stdout.write(str(1) + '\n')
		else:
			ans = (n - 1) // 2 + 1
			stdout.write(str(ans) + '\n')
	return
main()


t = int(input())
ina = []
for i in range(t):
	n = int(input())
	ina.append(n)
for a in ina:
	if a % 2 == 0:
		print(a // 2)
	else:
		print(a // 2 + 1)


t = int(input())
r = []
for _ in range(t):
	n = int(input())
	total = (n + 1) // 2
	total = int(total)
	r.append(total)
for x in r:
	print(x)


def solve():
	print((int(input()) + 1) // 2)
for i in range(int(input())):
	solve()


n = int(input())
for k in range(n):
	a = int(input())
	if a < 3:
		print(1)
		continue
	if a % 2 == 0:
		print(a // 2)
	else:
		print((a - 1) // 2 + 1)


ll = lambda : list(map(int, input().split()))
st = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
from math import *
for i in range(ii()):
	print(ceil(ii() / 2))


t = int(input())
for x in range(t):
	n = int(input())
	y = n - 1
	y = y // 2
	y = y + 1
	print(y)


from sys import stdin
from math import ceil
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	print(ceil(n / 2))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		rr.append((n + 1) // 2)
	return JA(rr, '\n')
print(main())


from sys import stdin, stdout
import bisect
n = int(stdin.readline())
for i in range(n):
	a = int(stdin.readline())
	ans = (a + 1) // 2
	stdout.write(str(ans) + '\n')


def printDivisors(n):
	if n % 2 == 1:
		return n // 2 + 1
	return n // 2
t = int(input())
for i in range(t):
	n = int(input())
	print(printDivisors(n))


def same_length(n):
	if n == 1 or n == 2:
		return 1
	elif n == 3:
		return 2
	if n % 2 == 0:
		return n // 2
	elif n % 2 == 1:
		return (n - 1) // 2 + 1
t = int(input())
for _ in range(t):
	n = int(input())
	print(same_length(n))


answer = []
for i in range(int(input())):
	c = 0
	n = int(input())
	if n == 1 or n == 2:
		c = 1
	elif n % 2 == 0:
		c = n // 2
	else:
		c = n // 2 + 1
	answer.append(c)
for i in range(len(answer)):
	print(answer[i])


x = int(input())
for i in range(x):
	a = int(input())
	if a % 2 == 0:
		print(a // 2)
	elif a % 2 == 1:
		print((a + 1) // 2)


l = []
N = int(input())
for _ in range(N):
	l.append(int(input()))
for v in l:
	if v == 1:
		print(1)
	elif v > 1:
		print(1 + (v - 1) // 2)
	else:
		print(0)


test = int(input())
test_arr = []
for _ in range(test):
	n = int(input())
	if n % 2 == 0:
		test_arr.append(n // 2)
	else:
		test_arr.append((n - 1) // 2 + 1)
for t in test_arr:
	print(t)


t = int(input())
while t > 0:
	c = 0
	n = int(input())
	if n % 2 == 0:
		c = n // 2
	else:
		c = n // 2 + 1
	print(c)
	t = t - 1


t = int(input())
for ex in range(t):
	n = int(input())
	print(n // 2 + n % 2)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	n = getInt()
	res = n // 2 + n % 2
	print(res)


t = int(input())
l = []
for i in range(t):
	n = int(input())
	l.append(n)
for c in l:
	if c % 2 == 0:
		print(int(c / 2))
	else:
		print(int((c + 1) / 2))


from math import ceil
t = int(input())
for _ in range(t):
	a = int(input())
	print((a + 1) // 2)


for _ in range(int(input())):
	a = int(input())
	if a == 1:
		print('1')
	elif a == 2:
		print('1')
	elif a == 3:
		print('2')
	elif a % 2 == 0:
		print(a // 2)
	elif a % 2 == 1:
		print((a + 1) // 2)


cases = int(input())
all_cases = [int(input()) for i in range(cases)]

def solver(all_cases):
	for i in all_cases:
		if i % 2 != 0:
			print((i + 1) // 2)
		else:
			print(i // 2)
solver(all_cases)


n = int(input())
l = []
for x in range(n):
	l.append(int(input()))
for x in l:
	print((x + 1) // 2)


import os
import operator
from collections import defaultdict
import sys
from io import BytesIO, IOBase
import bisect

def inar():
	return [int(el) for el in input().split()]

def main():
	for _ in range(int(input())):
		n = int(input())
		if n == 1:
			print(1)
			continue
		elif n % 2 == 0:
			print(n // 2)
		else:
			print((n + 1) // 2)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		n = iin()
		if n & 1 == 1:
			print((n - 1) // 2 + 1)
		else:
			print((n - 2) // 2 + 1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def solve(a):
	if (a + 1) % 2 == 0:
		print((a + 1) // 2)
	else:
		print(a // 2)
t = int(input())
while t != 0:
	n = int(input())
	solve(n)
	t -= 1


import sys
input = sys.stdin.readline
from math import ceil
for i in range(int(input())):
	n = int(input())
	print((n + 1) // 2)


import math
for i in range(int(input())):
	x = int(input())
	if x == 2:
		print(1)
	else:
		print(math.ceil(x / 2))


from sys import stdin, stdout
from sys import maxsize
import math

def solve():
	pass
test = 1
test = int(input())
for t in range(0, test):
	n = int(input())
	print(math.ceil(n / 2))
	ans = solve()


import collections as cc
import math as mt
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n,) = I()
	if n == 1:
		print(1)
	elif n == 2:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print((n + 1) // 2)


t = int(input())
for _ in range(t):
	n = int(input())
	c = (n - 1) // 2 + 1
	print(c)


from math import ceil
for i in range(int(input())):
	x = int(input())
	print(ceil(x / 2))


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def solve():
	n = input(11)
	out(1 + n >> 1)
	return
for i in range(input(11)):
	solve()


T = int(input())
for t in range(1, T + 1):
	N = int(input())
	if not N / 2 - N // 2:
		print(N // 2)
	else:
		print(N // 2 + 1)


import sys
import math
import collections
from sys import stdin, stdout, setrecursionlimit
import bisect as bs
setrecursionlimit(2 ** 20)
M = 10 ** 9 + 7
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	print(n // 2 + n % 2)


t = int(input())
for _ in range(t):
	n = int(input())
	k = n + 1
	k = k // 2
	print(k)


n = int(input())
i = 1
while i <= n:
	a = int(input())
	if a % 2 == 0:
		print(int(a / 2))
	else:
		print(int(a / 2) + 1)
	i += 1


import math
n = int(input())
for i in range(n):
	m = int(input())
	print(math.floor((m + 1) / 2))


for _ in range(int(input())):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
		continue
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


import sys
T = int(sys.stdin.readline())
for i in range(T):
	N = int(sys.stdin.readline())
	if N % 2 == 1:
		print((N + 1) // 2)
	else:
		print(N // 2)


T = int(input())
for i in range(T):
	x = int(input())
	if x == 1:
		print(1)
	else:
		print((x + 1) // 2)


test_case = int(input())
for i in range(test_case):
	length = int(input())
	if length % 2 == 0:
		print(length // 2)
	else:
		print(length // 2 + 1)


import sys
from os import path
if path.exists('C:/Users/prana/Desktop/sublime/input.txt'):
	sys.stdin = open('C:/Users/prana/Desktop/sublime/input.txt', 'r')
	sys.stdout = open('C:/Users/prana/Desktop/sublime/output.txt', 'w')

def solve():
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	else:
		print((n - 1) // 2 + 1)
T = 1
T = int(input())
for _ in range(1, T + 1):
	print('Case #', _, file=sys.stderr)
	solve()


from pprint import pprint
import sys
input = sys.stdin.readline
q = int(input())
import math
for _ in range(q):
	n = int(input())
	print(math.ceil(n / 2))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def printMaxSticks():
	sticks = inp()
	maxSticks = (sticks + 1) / 2
	print(int(maxSticks))
test = inp()
while test > 0:
	printMaxSticks()
	test -= 1


try:
	k = int(input())
	for i in range(k):
		t = int(input())
		if t % 2 == 0:
			print(t // 2)
		else:
			print(t // 2 + 1)
except Exception:
	pass


import sys
input = lambda : sys.stdin.readline().rstrip()
t = int(input())
for _ in range(t):
	n = int(input())
	print((n + 1) // 2)


import sys
import bisect as b
import math
from collections import defaultdict as dd
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())

def pref(a, n, f):
	pre = [0] * n
	if f == 0:
		pre[0] = a[0]
		for i in range(1, n):
			pre[i] = a[i] + pre[i - 1]
	else:
		pre[-1] = a[-1]
		for i in range(n - 2, -1, -1):
			pre[i] = pre[i + 1] + a[i]
	return pre
maxint = 10 ** 24

def kadane(a, size):
	max_so_far = -maxint - 1
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far
for _ in range(inin()):
	n = inin()
	print((n + 1) // 2)


def fname(n):
	if n % 2 != 0:
		return int((n - 1) / 2 + 1)
	else:
		return int(n / 2)
t = int(input())
for _ in range(t):
	n = int(input())
	print(fname(n))


t = int(input())
while t > 0:
	a = int(input())
	print((a - 1) // 2 + 1)
	t -= 1


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	print(int(input()) + 1 >> 1)


for k in range(int(input())):
	a = int(input())
	import math
	print(math.ceil(a / 2))


MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
from collections import *
for _ in range(ii()):
	n = ii()
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


for i in range(0, int(input())):
	n = int(input())
	ans = 1 + int((n - 1) / 2)
	print(ans)


import sys
from sys import stdin
from collections import deque, Counter
from math import factorial
from itertools import groupby

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	print(1 + (n - 1) // 2)


from sys import stdin
t = int(stdin.readline().strip())
for i in range(t):
	n = int(stdin.readline().strip())
	print(int((n + 1) // 2))


import sys
input = iter(sys.stdin.read().splitlines()).__next__
sys.setrecursionlimit(10000)
TC = int(input())
for tc in range(TC):
	N = int(input())
	if N % 2 == 0:
		res = N // 2
	else:
		res = 1 + (N - 1) // 2
	print(res)


t = int(input())

def primes(n):
	count = 0
	rl = 0
	while n % 2 == 0:
		n = n // 2
		count += 1
	while n % 3 == 0:
		n = n // 3
		rl += 1
	if n != 1 or count > rl:
		return -1
	else:
		return [rl, count]
from math import *
for xy in range(t):
	n = int(input())
	print((n + 1) // 2)


from math import ceil
T = int(input().rstrip())
for tt in range(T):
	n = int(input().rstrip())
	print(ceil(n / 2))


import sys
n = int(sys.stdin.readline())
for i in range(n):
	a = int(sys.stdin.readline())
	print((a + 1) // 2)


t = int(input())
for i in range(t):
	n = int(input())
	if n & 1:
		n += 1
	print(n // 2)


a = int(input())
for _ in range(0, a):
	n = int(input())
	print((n + 1) // 2)


n = int(input())
f = []
for i in range(n):
	m = int(input())
	if m % 2 == 0:
		f.append(int(m / 2))
	else:
		f.append(int((m + 1) / 2))
for j in range(n):
	print(f[j])


test = int(input())
for _ in range(test):
	n = int(input())
	if not n % 2:
		print(n // 2)
	else:
		print(n // 2 + 1)


def check(n):
	if n % 2 == 0:
		return n // 2
	else:
		return (n + 1) // 2
ans = []
t = int(input())
for i in range(t):
	num = int(input())
	ans.append(check(num))
for an in ans:
	print(an)


import math
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(int(n / 2))
	else:
		print(math.ceil(n / 2))


import math
tc = int(input())
for _ in range(tc):
	x = int(input())
	if x % 2 == 0:
		print(int(x / 2))
	else:
		print(int(1 + (x - 1) / 2))


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	if n == 1:
		print(1)
		continue
	if n % 2 == 0:
		print(int(n / 2))
		continue
	if n % 2 == 1:
		print(int((n - 1) / 2) + 1)


from collections import deque
import copy
for i in range(int(input())):
	n = int(input())
	print(n // 2 + n % 2)


tc = int(input())
while tc > 0:
	n = int(input())
	print(n // 2 + n % 2)
	tc -= 1


for _ in range(0, int(input())):
	print((int(input()) + 1) // 2)


x = int(input())
l = []
for i in range(x):
	a = int(input())
	if a % 2 == 0:
		a1 = a // 2
	else:
		a1 = a // 2 + 1
	l.append(a1)
for i in l:
	print(i)


a = int(input())
x = 0
y = 0
d = []
e = []
for i in range(a):
	b = int(input())
	if b == 1:
		print(1)
	elif b % 2 == 0:
		print(b // 2)
	elif b % 2 != 0:
		print(b // 2 + 1)


from math import floor
for dick in range(int(input())):
	t = int(input())
	if t == 1 or t == 2:
		print(1)
	else:
		print(floor((t - 1) / 2) + 1)


t = int(input())

def ceildiv(a, b):
	return -(-a // b)
answer = []
for a in range(t):
	answer.append(int(ceildiv(int(input()), 2)))
for b in answer:
	print(str(b))


from sys import stdin, exit
input = stdin.readline

def i():
	return input()

def ii():
	return int(input())

def iis():
	return map(int, input().split())

def liis():
	return list(map(int, input().split()))

def print_array(a):
	print(' '.join(map(str, a)))
t = ii()
for _ in range(t):
	n = ii()
	print((n + 1) // 2)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
import random
from queue import PriorityQueue
from collections import Counter as cc
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
from itertools import permutations
from math import factorial as f

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
import sys
t = int(input())
for _ in range(t):
	n = int(input())
	print(ceil(n / 2))


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, Counter
import math

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
t = intIn()
while t > 0:
	t -= 1
	n = intIn()
	print(math.ceil(n / 2))


def find_sticks(n):
	if n % 2 != 0:
		return n // 2 + 1
	else:
		return n // 2
test_cases = int(input())
result_array = []
for i in range(test_cases):
	number = int(input())
	result = find_sticks(number)
	result_array.append(result)
for i in range(test_cases):
	print(result_array[i])


for case in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


r = lambda : int(input())
for _ in range(r()):
	print((r() + 1) // 2)


from fractions import Fraction
import bisect
import os
import io
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
from queue import Queue

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
t = 1
t = iinput()
for _ in range(t):
	n = iinput()
	print(int(math.ceil(n / 2.0)))


from sys import stdin, stdout
int_in = lambda : int(stdin.readline())
arr_in = lambda : [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda : stdin.readline().strip()
out = lambda o: stdout.write('{}\n'.format(o))
arr_out = lambda o: out(' '.join(map(str, o)))
bool_out = lambda o: out('YES' if o else 'NO')
tests = lambda : range(1, int_in() + 1)
case_out = lambda i, o: out('Case #{}: {}'.format(i, o))

def solve(n):
	return (n + n % 2) // 2
for i in tests():
	n = int_in()
	out(solve(n))


for g in [*open(0)][1:]:
	print((int(g) + 1) // 2)


import sys, math

def ii():
	return int(input())

def mii():
	return map(int, input().split())

def lmii():
	return list(mii())

def main():
	for _ in range(ii()):
		n = ii()
		print(n // 2 if n % 2 == 0 else n // 2 + 1)
main()


for i in ' ' * int(input()):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import math
t = int(input())
while t != 0:
	t -= 1
	x = int(input())
	print(math.ceil(x / 2))


import math
for _ in range(int(input())):
	i = int(input())
	if i == 1:
		print(1)
	elif i > 1:
		print(math.ceil(i / 2))


def main():
	for t in range(int(input())):
		print((int(input()) + 1) // 2)
main()


t = int(input())
for o in range(t):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		n = n + 1
		print(n // 2)


from sys import stdin
N = int(stdin.readline())
for case in range(N):
	x = int(input())
	if x % 2 == 0:
		print(int(x / 2))
	else:
		print(int((x + 1) / 2))


n = int(input())
for i in range(n):
	ans = 0
	x = int(input())
	if x == 1:
		print(1)
		continue
	if x == 2:
		print(1)
		continue
	if x == 3:
		print(2)
		continue
	if x % 2:
		print((x - 1) // 2 + 1)
	else:
		print(x // 2)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print((n + 1) // 2)
main()


def main(n):
	if n <= 2:
		return 1
	if n == 3:
		return 2
	return n // 2 if n % 2 == 0 else n // 2 + 1
arr = []
for _ in range(int(input())):
	x = int(input())
	ans = main(x)
	arr.append(ans)
for i in arr:
	print(i)


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list
t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 0:
		print(int(n / 2))
	else:
		print(int(n / 2) + 1)


try:
	tc = int(input())
except:
	exit()
for _ in range(tc):
	n = int(input())
	if n <= 2:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print((n + 1) // 2)


import math
for i in range(int(input())):
	print(int(math.ceil(int(input()) / 2)))


n = int(input())
for i in range(0, n):
	o = int(input())
	if o == 1 or o == 2:
		print(1)
	else:
		o -= 1
		o = o // 2
		print(o + 1)


for k in range(int(input())):
	a = int(input())
	print((a - 1) // 2 + 1)


t = int(input())
for i in range(t):
	n = int(input())
	r = int(n % 2)
	d = int(n / 2)
	if r == 1:
		print(d + 1)
	else:
		print(d)


import sys
import math
from decimal import *

def I():
	return int(sys.stdin.readline())

def IL():
	return list(map(int, sys.stdin.readline().strip().split()))

def ILS():
	return list(map(str, sys.stdin.readline().strip().split()))

def solve():
	tt = I()
	for ii in range(tt):
		n = I()
		print((n - 1) // 2 + 1)
solve()


t = int(input())
lst = []
for i in range(t):
	n = int(input())
	if n == 1:
		c = 1
	elif n % 2 != 0:
		c = n // 2 + 1
	else:
		c = n // 2
	lst.append(c)
for r in lst:
	print(int(r))


from math import *
for u in range(int(input())):
	n = int(input())
	print(ceil(n / 2))


t = int(input())
for i in range(t):
	n = int(input())
	if str(n / 2).endswith('.0'):
		print(n // 2)
	else:
		print(n // 2 + 1)


n = int(input())
for i in range(n):
	d = 0
	k = int(input())
	d = k // 2
	if k % 2 == 1:
		d += 1
	print(d)


t = int(input())
for test in range(t):
	a = int(input())
	print((a + 1) // 2)


for t in range(int(input())):
	x = int(input())
	print(x // 2 + x % 2)


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		n = I()
		if n % 2 == 0:
			print(n // 2)
		else:
			print((n - 1) // 2 + 1)
main()


from math import *
from itertools import *
from collections import *
import sys
INF = 1000000000.0 + 1
pi = 3.141592653589793

def ii():
	return int(input())

def mas():
	return input().split()

def mapint():
	return map(int, mas())

def solve():
	n = ii()
	for i in range(n):
		k = ii()
		print(k // 2 + int(k % 2 == 1))

def main():
	t = 1
	while t:
		solve()
		t -= 1
main()


t = int(input())
for i in range(t):
	n = int(input())
	m = (n + 1) // 2
	print(m)


import sys
readline = lambda : sys.stdin.readline().strip('\n')
readlist = lambda : list(map(int, readline().split()))
for i in range(int(input())):
	n = int(input())
	print(n // 2 + n % 2)


import math

def BuubleSort(n):
	return (n + 1) // 2

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		ans = BuubleSort(n)
		print(ans)
main()


import os, sys
from io import IOBase, BytesIO
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log, pi, sin
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var, end='\n'):
	sys.stdout.write(str(var) + end)

def outarr(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val):
	return [val for i in range(n)]

def l2d(n, m, val):
	return [l1d(m, val) for j in range(n)]
for _ in range(int(data())):
	n = int(data())
	if n & 1:
		n += 1
	out(n // 2)


import math
import sys
t = int(input())
for cs in range(t):
	n = int(input())
	print((n + 1) // 2)


t = int(input())
a = [int(input()) for x in range(t)]
for i in range(t):
	b = (a[i] - 1) // 2
	print(b + 1)


n = int(input(''))
matrix = []
for i in range(n):
	matrix.append(int(input('')))
for i in range(n):
	x = matrix[i]
	if x % 2 == 0:
		print(int(x / 2))
	else:
		print(int((x + 1) / 2))


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	result.append(n)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	n = int(input())
	ans = n // 2 + n % 2
	print(ans)
t = int(input())
for i in range(0, t):
	main()


t = int(input())
for p in range(t):
	x = int(input())
	print((x + 1) // 2)


for qq in range(int(input())):
	print(1 + (int(input()) - 1) // 2)


import sys, math, cmath, time
start_time = time.time()

def solve():
	n = inp() + 1
	print(n // 2)

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(t):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	return input().strip()

def invr():
	return map(int, input().split())

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def string_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = (q[ord(a[i]) - 97], 1)
	return q

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


def max(n):
	return 1 + (n - 1) // 2
T = int(input())
for _ in range(T):
	n = int(input())
	print(max(n))


import math
n = int(input())
for i in range(n):
	m = int(input())
	if m % 2 == 0:
		print(m // 2)
	else:
		print((m + 1) // 2)


import sys

def swap(x, y, a):
	temp = a[x]
	a[x] = a[y]
	a[y] = temp
	return a

def solve():
	return None

def main():
	q = []
	for line in sys.stdin.readlines():
		q.append(line)
	for i in range(len(q)):
		q[i] = int(q[i].rstrip().split(' ')[0])
	for i in range(1, len(q)):
		n = q[i]
		if n % 2 == 0:
			n /= 2
			print(int(n))
		else:
			n += 1
			n /= 2
			print(int(n))
main()


import math
for _ in range(int(input())):
	n = int(input())
	print(1 + (n - 1) // 2)


from math import floor
t = int(input())
for x in range(t):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 1:
		print(int(n / 2) + 1)
	elif n % 2 == 0:
		print(int(n / 2))


sticks = eval(input())
lengths = []
for _ in range(sticks):
	length = eval(input())
	lengths.append(length)
for length in lengths:
	print((length + 1) // 2)


t = int(input())
l = []
for i in range(t):
	l.append(int(input()))
for i in range(t):
	if l[i] <= 3:
		if l[i] == 1 or l[i] == 2:
			print(1)
		else:
			print(2)
	elif l[i] % 2 == 0:
		print('%d' % (l[i] / 2))
	else:
		print('%d' % ((l[i] + 1) / 2))


T = int(input())
for _ in range(T):
	N = int(input())
	print((N + 1) // 2)


t = int(input())
for j in range(t):
	i = int(input())
	if i % 2 != 0:
		val = (i + 1) // 2
	else:
		val = i // 2
	print(val)


import sys
import math
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(input())
	nn = n >> 1
	if n & 1:
		nn += 1
	print(nn)


def read_int():
	return int(input().strip())

def read_ints():
	return list(map(int, input().strip().split(' ')))

def solve():
	n = read_int()
	return (n + 1) // 2
T = read_int()
for _ in range(T):
	print(solve())


def magicalSticks(n):
	if n % 2 == 0:
		return n // 2
	else:
		return n // 2 + 1
i = int(input())
for i in range(i):
	n = int(input())
	print(magicalSticks(n))


t = int(input())
for i in range(t):
	x = int(input())
	print((x + 1) // 2)


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	n = int(input())
	print(n // 2 if n % 2 == 0 else n // 2 + 1)


import sys
import heapq

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print((n + 1) // 2)
	return
main()


test = int(input())
while test:
	cur = int(input())
	print(int((cur + 1) / 2))
	test = test - 1


t = int(input())
while t:
	t -= 1
	arr = int(input())
	if arr == 1 or arr == 2:
		print(1)
	elif arr % 2 == 0:
		print(int(arr / 2))
	else:
		print(int(arr / 2 + 1))


def solution():
	n = int(input())
	print((n + 1) // 2)

def sol():
	t = int(input())
	for _ in range(t):
		solution()
sol()


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
n = inp()
for i in range(n):
	m = inp()
	print((m + 1) // 2)


N = int(input())
for _ in range(N):
	A = int(input())
	if A % 2 == 0:
		print(A // 2)
	else:
		print((A + 1) // 2)


import math
i = int(input())
for t in range(i):
	a = int(input())
	print(math.ceil(a / 2))


for _tes in range(int(input())):
	n = int(input())
	if n < 3:
		print(1)
	else:
		print(1 + int((n - 1) / 2))


import sys
INF = 10 ** 18
MOD = 10 ** 9 + 7
input = lambda : sys.stdin.readline().rstrip()
YesNo = lambda b: bool([print('Yes')] if b else print('No'))
YESNO = lambda b: bool([print('YES')] if b else print('NO'))
int1 = lambda x: int(x) - 1
T = int(input())
for _ in range(T):
	N = int(input())
	if N % 2 == 0:
		print(N // 2)
	else:
		print(-(-N // 2))


import sys
input = sys.stdin.readline
t = int(input())
for test in range(t):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 0:
		print(int(n / 2))
	else:
		print(int((n - 1) / 2) + 1)


import math
n = int(input())
for w in range(n):
	a = int(input())
	print(math.ceil(a / 2))


test_cases = int(input())
for e in range(test_cases):
	n = int(input())
	ans = (n + 1) // 2
	print(ans)


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
from collections import deque
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(1 + (n - 1) // 2)


from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	if n & 1 == 1:
		ans = n // 2 + 1
	else:
		ans = n // 2
	print(ans)


import sys
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

def solve():
	(n,) = I()
	if n % 2:
		print(1 + n // 2)
	else:
		print(n // 2)
(t,) = I()
while t:
	t -= 1
	solve()


for _ in range(int(input())):
	n = int(input())
	res = 0
	res = n // 2 + n % 2
	print(res)


s = input()
while True:
	try:
		s = int(input())
		print((s - 1) // 2 + 1)
	except:
		break


import math
for __ in range(int(input())):
	a = int(input())
	print(math.ceil(a / 2))


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
from math import ceil
for i in range(ip()):
	n = ip()
	print(int(ceil(n / 2)))


T = int(input())
while T > 0:
	num = int(input())
	print('%d' % ((num + 1) // 2))
	T = T - 1


from collections import Counter
from collections import defaultdict
from collections import deque
import math
import heapq
import sys
import io, os
input = sys.stdin.readline
from bisect import *
rs = lambda : input().strip()
ri = lambda : int(input())
rl = lambda : list(map(int, input().strip().split()))
rls = lambda : list(map(str, input().split()))
t = int(input())
for _ in range(0, t):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print((n - 1) // 2 + 1)


from sys import stdin
import math

def main():
	tc = int(stdin.readline().strip())
	for i in range(tc):
		n = int(stdin.readline().strip())
		print(math.ceil(n / 2))
main()


import math
for _ in range(int(input())):
	s = int(input())
	x = math.ceil(s / 2)
	print(x)


import sys
import math as mt
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	n = int(input())
	print(1 + (n - 1) // 2)


for i in range(int(input())):
	n = int(input())
	print(round(n / 2 + 0.1))


T = int(input())
for _ in range(T):
	n = int(input())
	print(n + 1 >> 1)


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	t = 0
	if n % 2 == 0:
		print(n // 2)
	else:
		a = n // 2
		b = n % 2
		print(a + b)


n = int(input())
for t in range(n):
	k = int(input())
	print(k // 2 + k % 2)


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	n = val()
	print(math.ceil(n / 2))


import os
import sys
from io import BytesIO, IOBase

def solution(n):
	if n == 1:
		write(1)
		return
	if n & 1:
		write(n // 2 + 1)
	else:
		write(n // 2)

def main():
	for _ in range(r_int()):
		n = r_int()
		solution(n)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def write(*args, end='\n'):
	for x in args[:-1]:
		sys.stdout.write(str(x) + ' ')
	sys.stdout.write(str(args[-1]))
	sys.stdout.write(end)

def r_array():
	return [int(x) for x in input().split()]

def r_int():
	return int(input())
main()


from math import *
from collections import *
from bisect import *
import sys
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	print((n + 1) // 2)


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(sys.stdin.readline())
	print((n + 1) // 2)


for z in range(int(input())):
	print((int(input()) + 1) // 2)


def solve():
	N = int(input())
	return (N + 1) // 2

def main():
	for _ in range(int(input())):
		print(solve())
main()


for _ in ' ' * int(input()):
	print((int(input()) + 1) // 2)


def ans(n):
	if n % 2 == 0:
		return n // 2
	return (n + 1) // 2
T = int(input())
for _ in range(T):
	n = int(input())
	print(ans(n))


for _ in range(int(input())):
	num = int(input())
	if num < 3:
		print(1)
		continue
	if num % 2 == 0:
		print((num - 1) // 2 + 1)
	else:
		print((num + 1) // 2)


def func(n):
	if n & 1:
		print(n // 2 + 1)
	else:
		print(n // 2)
cases = int(input())
for i in range(cases):
	func(int(input()))


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	c = 1
	if n == 1:
		print(1)
	elif n == 2:
		print(1)
	else:
		print((n - 1) // 2 + 1)


def solve():
	for _ in range(int(input())):
		a = int(input())
		if a % 2 == 0:
			print(a // 2)
		else:
			print(a // 2 + 1)
solve()


import math
a = int(input())
for i in range(0, a):
	b = int(input())
	print(math.ceil(b / 2))


import sys

def input():
	return sys.stdin.readline().rstrip()

def input_split():
	return [int(i) for i in input().split()]
testCases = int(input())
answers = []
for _ in range(testCases):
	n = int(input())
	if n == 3:
		ans = 2
	elif n == 1 or n == 2:
		ans = 1
	else:
		ans = n // 2 + n % 2
	answers.append(ans)
print(*answers, sep='\n')


t = int(input())
List = []
for i in range(0, t):
	n = int(input())
	List.append(n)
for j in List:
	print(int((j + 1) / 2))


import math
import sys
import collections
import bisect
from collections import defaultdict
from sys import stdin, stdout
MOD = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 7)

def take_root(num):
	return math.ceil(math.sqrt(num))

def sieve():
	limit = 86028121
	isprime = [1] * 86028122
	isprime[0] = 0
	isprime[1] = 0
	for i in range(2, take_root(limit + 1)):
		if isprime[i] == 1:
			for j in range(i * i, limit + 1, i):
				isprime[j] = 0
	primes = []
	for i in range(limit + 1):
		if isprime[i] == True:
			primes.append(i)
	return primes

def minput():
	return map(int, input().split())

def iinput():
	return int(input())

def strinput():
	return input()

def linput():
	return list(map(int, input().split()))
for _ in range(iinput()):
	n = iinput()
	print(math.ceil(n / 2))


from math import *

def solve():
	n = int(input())
	print(ceil(n / 2))
t = int(input())
for x in range(t):
	solve()


t = int(input())
dec = []
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		dec.append(n // 2)
	else:
		dec.append(n // 2 + 1)
print(*dec, sep='\n')


import sys
readline = sys.stdin.readline
t = int(readline())
for _ in range(t):
	n = int(readline())
	print(-(-n // 2))


try:
	for _ in range(int(input())):
		n = int(input())
		if n == 1 or n == 2:
			print(1)
		elif n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
except:
	pass


t = int(input())
ns = [int(input()) for n in range(t)]
for n in ns:
	if n % 2 == 1:
		eq = n // 2 + 1
	else:
		eq = n // 2
	print(eq)


for _ in range(int(input())):
	num = int(input())
	if num & 1:
		print(num // 2 + 1)
	else:
		print(num // 2)


t = int(input())
for test in range(t):
	c = int(input())
	if c % 2 == 0:
		print(c // 2)
	else:
		print((c + 1) // 2)


t = int(input())
for i in range(t):
	a = int(input())
	ans = 0
	if a % 2 == 1:
		ans += a // 2 + 1
	else:
		ans += a // 2
	print(ans)


def main():
	n = int(input())
	if n % 2:
		print((n + 1) // 2)
	else:
		print(n // 2)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


import math
import bisect
import sys
from collections import OrderedDict
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
T = inp()
for t in range(T):
	N = inp()
	print((N + 1) // 2)


ans = []
for _ in range(int(input())):
	n = int(input())
	ans.append((n - 1) // 2 + 1)
print('\n'.join(map(str, ans)))


def call():
	n = int(input())
	if n % 2:
		print(n // 2 + 1)
	else:
		print(n // 2)
for _ in range(int(input())):
	call()


import math
from sys import stdin
from collections import Counter, defaultdict, deque
input = stdin.readline
mod = pow(10, 9) + 7

def solve():
	n = int(input())
	x = 1
	x = x + (n - 1) // 2
	print(x)
for _ in range(int(input())):
	solve()


t = int(input())
while t:
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)
	t -= 1


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		if N % 2 == 0:
			print(N // 2)
		else:
			print(N // 2 + 1)
main()


input1 = input()
for i in range(int(input1)):
	sticks = input()
	print(str(1 + (int(sticks) - 1) // 2))


import math

def compute(n):
	return math.ceil(n / 2)
t = int(input())
for _ in range(t):
	n = int(input())
	print(compute(n))


from sys import stdin, stdout
q = int(input())
for i in range(q):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


n = int(input())
f = []
for i in range(n):
	m = int(input())
	print((m + 1) // 2)


T = int(input())
for i in range(T):
	n = int(input())
	print((n + 1) // 2)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far
from math import *
for _ in range(int(input())):
	n = int(input())
	print(1 + (n - 1) // 2)


def sol(n):
	s = n * (n + 1) / 2
	if n % 2 == 1:
		return (n + 1) // 2
	else:
		return n // 2
t = int(input())
for _ in range(t):
	n = int(input())
	print(sol(n))


t = int(input())
for _ in range(t):
	e = int(input())
	if e < 3:
		print(1)
		continue
	if e % 2 == 0:
		e -= 1
	print(e // 2 + 1)


import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

def count_ans(n):
	return 1 + (n - 1) // 2

def main():
	t = int(input())
	ns = [int(input()) for _ in range(t)]
	for i in range(t):
		print(count_ans(ns[i]))
main()


inputn = int(input())
ans = []
for i in range(inputn):
	c = int(input())
	z = 1 + int((c - 1) / 2)
	ans.append(z)
for i in ans:
	print(i)


from collections import Counter as f
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


t = int(input())
for i in range(t):
	x = int(input())
	if x % 2 == 0 and x > 2:
		print(x // 2)
	elif x == 1 or x == 2:
		print(1)
	else:
		print(x // 2 + 1)


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	for test in range(tests):
		n = inp()
		if n == 1:
			print(1)
			continue
		elif n == 3:
			print(2)
			continue
		print(max(math.ceil(n / 2), 1))
main()


import math
for _ in ' ' * int(input()):
	print(math.ceil(int(input()) / 2))


def magical(n):
	if n <= 2:
		return 1
	if n % 2 == 0:
		return n // 2
	else:
		return n // 2 + 1
t = int(input())
for i in range(t):
	n = int(input())
	print(magical(n))


T = int(input())
while T != 0:
	T -= 1
	print((int(input()) + 1) // 2)


def solve():
	n = int(input())
	print(n % 2 + n // 2)
for i in range(int(input())):
	solve()


read = lambda : map(int, input().split())
t = int(input())
for _ in range(t):
	n = int(input())
	print((n + 1) // 2)


import sys
t = int(input())
for _ in range(t):
	n = int(input())
	print((n + 1) // 2)


t = int(input())
for i in range(t):
	n = int(input())
	z = (n + 1) // 2
	print(z)


import sys
input = sys.stdin.readline
T = int(input())
for t in range(T):
	N = int(input())
	print((N + 1) // 2)


import sys
import random
from fractions import Fraction
from math import *

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def finput():
	return float(input())

def tinput():
	return input().split()

def linput():
	return list(input())

def rinput():
	return map(int, tinput())

def fiinput():
	return map(float, tinput())

def rlinput():
	return list(map(int, input().split()))

def trinput():
	return tuple(rinput())

def srlinput():
	return sorted(list(map(int, input().split())))

def NOYES(fl):
	if fl:
		print('NO')
	else:
		print('YES')

def YESNO(fl):
	if fl:
		print('YES')
	else:
		print('NO')

def main():
	n = iinput()
	print(n // 2 + n % 2)
for i in range(iinput()):
	main()


t = int(input())
for _ in range(t):
	a = int(input())
	if a == 1:
		print(1)
	elif a % 2 == 0:
		print(int(a / 2))
	else:
		print(int(a / 2) + 1)


n = int(input())
sum = 0
c = 0
for i in range(n):
	a = int(input())
	if a % 2 == 0:
		b = a // 2
	else:
		b = a // 2 + 1
	print(b)


reps = int(input())
for _ in range(reps):
	n = int(input())
	print(n // 2 + n % 2)


inp = lambda : int(input())
inpm = lambda : map(int, input().split())
inpl = lambda : list(inpm())
l2mn = lambda _n, _m: [[0 for __ in range(_m)] for _ in range(_n)]
l2n = lambda _n: l2mn(_n, _n)
INF = int(1e+18)
MOD = int(1000000000.0) + 7
N = 2000009

def solve():
	n = inp()
	print((n + 1) // 2)

def main():
	t = inp()
	for i in range(t):
		solve()
main()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')
from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def main():
	for _ in range(N()):
		n = N()
		if n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
main()


test = int(input())
for _ in range(test):
	nn = int(input())
	if nn & 1 == 1:
		nn -= 1
		print(nn // 2 + 1)
	else:
		nn -= 2
		print(nn // 2 + 1)


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in range(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in range(base ** n):
		s = [tb // base ** bt % base for bt in range(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

class Tree:

	def __init__(self, inp_size=None, ls=None, init=True, index=1):
		self.LCA_init_stat = False
		self.ETtable = []
		if init:
			if ls == None:
				self.stdin(inp_size, index=index)
			else:
				self.node_size = len(ls) + 1
				(self.edges, _) = GI(self.node_size, self.node_size - 1, ls, index=index)
		return

	def stdin(self, inp_size=None, index=1):
		if inp_size == None:
			self.node_size = int(input())
		else:
			self.node_size = inp_size
		(self.edges, _) = GI(self.node_size, self.node_size - 1, index=index)
		return

	def listin(self, ls, index=0):
		self.node_size = len(ls) + 1
		(self.edges, _) = GI(self.node_size, self.node_size - 1, ls, index=index)
		return

	def dfs(self, x, func=lambda pr, prv, nx, dist: prv + dist, root_v=0):
		q = deque([x])
		v = [None] * self.node_size
		v[x] = root_v
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = func(c, v[c], nb, d)
		return v

	def bfs(self, x, func=lambda pr, prv, nx, dist: prv + dist, root_v=0):
		q = deque([x])
		v = [None] * self.node_size
		v[x] = root_v
		while q:
			c = q.popleft()
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = func(c, v[c], nb, d)
		return v

	def parent(self, x):
		return self.dfs(0, func=lambda pr, prv, nx, dist: pr, root_v=-1)

	def topological_sort(self, x):
		tps = []
		q = deque([x])
		v = [None] * self.node_size
		v[x] = 0
		while q:
			c = q.popleft()
			tps.append(c)
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = 0
		return tps

	def EulerTour(self, x):
		q = deque()
		q.append(x)
		self.depth = [None] * self.node_size
		self.depth[x] = 0
		self.ETtable = []
		self.ETdepth = []
		self.ETin = [-1] * self.node_size
		self.ETout = [-1] * self.node_size
		cnt = 0
		while q:
			c = q.pop()
			if c < 0:
				ce = ~c
			else:
				ce = c
				for (nb, d) in self.edges[ce]:
					if self.depth[nb] == None:
						q.append(~ce)
						q.append(nb)
						self.depth[nb] = self.depth[ce] + 1
			self.ETtable.append(ce)
			self.ETdepth.append(self.depth[ce])
			if self.ETin[ce] == -1:
				self.ETin[ce] = cnt
			else:
				self.ETout[ce] = cnt
			cnt += 1
		return

	def doubling_LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.depth = [None] * self.node_size
			self.depth = self.bfs(0, func=lambda pr, prv, nxt, dist: prv + 1)
			self.par = self.bfs(0, func=lambda pr, prv, nxt, dist: pr)
			self.db = [self.par]
			for i in range(self.node_size.bit_length()):
				self.db += [[self.db[-1][self.db[-1][i]] for i in range(self.node_size)]]
			self.LCA_init_stat = True
		dx = self.depth[x]
		dy = self.depth[y]
		if dx > dy:
			(dx, dy) = (dy, dx)
		c = self.node_size.bit_length()
		while c > 0:
			if dx + c <= dy:
				x = self.db[c][x]
				dx += 1 << c
			c >>= 1
		if x == y:
			return x
		c = self.node_size.bit_length()
		while c > 0:
			if self.db[c][x] != self.db[c][y]:
				x = self.db[c][x]
				y = self.db[c][y]
			c >>= 1
		return self.par[x]

	def LCA_init(self, root):
		self.EulerTour(root)
		self.st = SparseTable(self.ETdepth, init_func=min, init_idl=inf)
		self.LCA_init_stat = True
		return

	def LCA(self, root, x, y):
		if self.LCA_init_stat == False:
			self.LCA_init(root)
		(xin, xout) = (self.ETin[x], self.ETout[x])
		(yin, yout) = (self.ETin[y], self.ETout[y])
		a = min(xin, yin)
		b = max(xout, yout, xin, yin)
		id_of_min_dep_in_et = self.st.query_id(a, b + 1)
		return self.ETtable[id_of_min_dep_in_et]

	def __str__(self):
		return str(self.edges)

	def show(self):
		if all([all([d == 1 for (nd, d) in e]) for e in self.edges]):
			print([[nd for (nd, d) in e] for e in self.edges])
		else:
			print(self)

	def dfs2(self, x, func=lambda pr, prv, nx, dist: prv + dist, root_v=0):
		q = deque([x])
		v = [None] * self.node_size
		v[x] = root_v
		dfs_tr = [x]
		while q:
			c = q.pop()
			for (nb, d) in self.edges[c]:
				if v[nb] == None:
					q.append(nb)
					v[nb] = func(c, v[c], nb, d)
					dfs_tr += (nb,)
		return (v, dfs_tr)

class SparseTable:

	def __init__(self, ls, init_func=min, init_idl=float('inf')):
		self.func = init_func
		self.idl = init_idl
		self.size = len(ls)
		self.N0 = self.size.bit_length()
		self.table = [ls[:]]
		self.index = [list(range(self.size))]
		self.lg = [0] * (self.size + 1)
		for i in range(2, self.size + 1):
			self.lg[i] = self.lg[i >> 1] + 1
		for i in range(self.N0):
			tmp = [self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) for j in range(self.size)]
			tmp_id = [self.index[i][j] if self.table[i][j] == self.func(self.table[i][j], self.table[i][min(j + (1 << i), self.size - 1)]) else self.index[i][min(j + (1 << i), self.size - 1)] for j in range(self.size)]
			self.table += [tmp]
			self.index += [tmp_id]

	def query(self, l, r):
		if r > self.size:
			r = self.size
		N = self.lg[r - l]
		return self.func(self.table[N][l], self.table[N][max(0, r - (1 << N))])

	def query_id(self, l, r):
		if r > self.size:
			r = self.size
		N = self.lg[r - l]
		(a, b) = (self.index[N][l], self.index[N][max(0, r - (1 << N))])
		if self.table[0][a] == self.func(self.table[N][l], self.table[N][max(0, r - (1 << N))]):
			b = a
		return b

	def right_bound(self, pos, x):
		k = (self.size - pos).bit_length()
		for j in range(k)[::-1]:
			nx = pos + (1 << j)
			if nx < n and self.query(pos, nx + 1) <= x:
				pos += 1 << j
		return pos

	def left_bound(self, pos, x):
		k = pos.bit_length()
		for j in range(k)[::-1]:
			nx = pos - (1 << j)
			if 0 <= nx and self.query(nx, pos + 1) <= x:
				pos -= 1 << j
		return pos

	def __str__(self):
		return str(self.table[0])

	def print(self):
		for i in self.table:
			print(*i)
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	ans = 0
	n = I()
	ans = n // 2
	if n % 2 == 1:
		ans += 1
	print(ans)


from sys import stdin
_input = stdin.readline
(_int, _range) = (int, range)

def solution():
	for _ in _range(_int(_input())):
		n = _int(_input())
		print(n // 2 if n % 2 == 0 else n // 2 + 1)
solution()


import sys
input = sys.stdin.readline
t = int(input())
import math
for t1 in range(t):
	n = int(input())
	print(math.ceil(n / 2))


from sys import stdin
import math
for _ in range(int(stdin.readline())):
	print(math.ceil(int(stdin.readline()) / 2))


def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	n = ii()
	n += 1
	print(n // 2)


for _ in [*open(0)][1:]:
	print(0 - -int(_) // 2)


import sys

def find_max_sticks(n):
	if n % 2 == 0:
		ans = (n - 2) / 2 + 1
	else:
		ans = (n - 1) / 2 + 1
	return int(ans)

def main():
	i = 0
	for line in sys.stdin:
		if i == 0:
			no_of_test_cases = int(line)
		else:
			n = int(line)
			print(find_max_sticks(n))
		if i == no_of_test_cases:
			break
		i += 1
main()


for i in range(0, int(input())):
	m = int(input())
	if m % 2 == 0:
		print(m // 2)
	else:
		print(m // 2 + 1)


try:
	t = int(input())
	for ii in range(t):
		n = int(input())
		if n == 1 or n == 2:
			print(1)
		elif n > 2:
			if n % 2 != 0:
				pp = (n - 1) / 2
				print(int(pp + 1))
			else:
				pp = (n - 2) / 2
				print(int(pp + 1))
except:
	pass


def solve(n):
	if n == 1 or n == 2:
		return 1
	sm = n * (n + 1) // 2
	return sm // n
t = int(input())
for _ in range(t):
	n = int(input())
	print(solve(n))


from sys import stdin

def iinput():
	return int(stdin.readline())
t = iinput()
for i in range(t):
	n = iinput()
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import collections
import itertools
import sys
from bisect import bisect_left
from collections import defaultdict, Counter
from math import sqrt, ceil
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def pr(a):
	r = sqrt(a)
	for i in range(2, int(r) + 1):
		if a % i == 0:
			return i
	return None

def res(param):
	for j in range(2, int(sqrt(param)) + 1):
		if param % j == 0:
			return j
	return None

def main():
	n = {1: 1, 2: 1, 3: 2, 4: 2}
	c = inp()
	for _ in range(c):
		d = inp()
		if d in n:
			print(n[d])
		else:
			print(d // 2 if d % 2 == 0 else d // 2 + 1)
main()


for tt in range(int(input())):
	n = int(input())
	if n & 1:
		print((n + 1) // 2)
	else:
		print(n // 2)


t = int(input())
for q in range(t):
	n = int(input())
	if n / 2 == int(n / 2):
		print(int(n / 2))
	elif n / 2 != int(n / 2):
		print(n // 2 + 1)


mod = 1000000007
ssi = lambda : map(int, input().split())
from math import *
t = int(input())
for _ in range(t):
	n = int(input())
	print(ceil(n / 2))


def solve():
	n = int(input())
	print((n + 1) // 2)
t = int(input())
for _ in range(t):
	solve()


import sys
from math import ceil
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def print(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer('\n')
for _ in range(int(input())):
	n = int(input())
	print(ceil(n / 2))


import sys, io, os, time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect, math, heapq
alphabet = 'abcdefghijklmnopqrstuvwxyz'
input = sys.stdin.readline
for ii in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


import sys, os, heapq, math
if os.path.exists('input.txt'):
	sys.stdout = open('output.txt', 'w')
	sys.stdin = open('input.txt', 'r')
for testcase in range(int(input())):
	k = int(input())
	print(math.ceil(k / 2))


import math
t = int(input())
for z in range(t):
	n = int(input())
	l = math.ceil(n / 2)
	print(l)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	print((n + 1) // 2)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	if n & 1 == 1:
		val = (n - 1) // 2 + 1
		print(val)
	else:
		print(n // 2)


n = int(input())
sticks = list()
for j in range(n):
	sticks.append(int(input()))
for j in range(n):
	count = 0
	count += sticks[j] // 2
	count += sticks[j] % 2
	print(count)


def ceildiv(a, b):
	return -(-a // b)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		result = ceildiv(n, 2)
		print(result)
main()


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def printp(p):
	for i in p:
		print(i)
MOD = 10 ** 9 + 7
T = 1
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect

def solution():
	for i in range(int(input())):
		n = int(input())
		if n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))
solution()


def solve():
	n = int(input())
	if n % 2 == 0:
		return n // 2
	else:
		return n // 2 + 1
	return n

def main():
	t = int(input())
	while t:
		print(solve())
		t -= 1
main()


def solve():
	n = int(input())
	print((n + 1) // 2)
t = int(input())
while t > 0:
	t -= 1
	solve()


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	if n == 1 or n == 2:
		print(1)
		continue
	if n % 2 == 0:
		print(int(n / 2))
	else:
		print(int((n + 1) / 2))


def solve(n):
	if n < 3:
		return 1
	if n % 2 == 0:
		return n // 2
	else:
		return 1 + solve(n - 1)
t = int(input())
for _ in range(t):
	n = int(input())
	print(solve(n))


def main():
	for _ in range(int(input())):
		n = int(input())
		print(n + 1 >> 1)
main()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	n = int(input())
	if n <= 2:
		print(1)
	else:
		print(1 + (n - 1) // 2)


def magicSticks(n):
	gp = n * (n + 1) // 2
	return gp // n
tc = int(input())
for i in range(tc):
	n = int(input())
	print(magicSticks(n))


tst = int(input())
t = 1
while t <= tst:
	n = int(input())
	x = (n + 1) / 2
	print(int(x))
	t += 1


import sys
import math
from collections import defaultdict, Counter
input = sys.stdin.readline

def print(x):
	sys.stdout.write(str(x) + '\n')
t = int(input())
for i in range(t):
	n = int(input())
	print(int(math.ceil(n / 2)))


from sys import stdin, stdout
for query in range(int(stdin.readline())):
	n = int(stdin.readline())
	if n % 2 == 0:
		stdout.write(str(n // 2) + '\n')
	else:
		stdout.write(str(n // 2 + 1) + '\n')


import math
tot = int(input().strip())
while tot > 0:
	n = int(input().strip())
	print(math.ceil(n / 2))
	tot -= 1


a = input()
for x in range(int(a)):
	c = input()
	if int(c) % 2 == 0:
		print(int(c) // 2)
	else:
		print(int(c) // 2 + 1)


answer = []
for t in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		answer.append(str(int(n / 2)))
	else:
		answer.append(str(int(n / 2) + 1))
print('\n'.join(answer))


n = int(input())
l = []
for i in range(0, n):
	p = int(input())
	l.append(p)
for j in range(0, n):
	if l[j] % 2 == 0:
		print(l[j] // 2)
	else:
		print(l[j] // 2 + 1)


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
from bisect import bisect, bisect_right, bisect_left

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))

def solve():
	n = get_int()
	return (n + 1) // 2

def main():
	print(solve())
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


n = eval(input())
nums = []
for i in range(n):
	nums.append(eval(input()))
result = []
for num in nums:
	result.append((num + 1) // 2)
for res in result:
	print(res)


import sys

def rl():
	return sys.stdin.readline().strip()
T = int(rl())
for test in range(T):
	n = int(rl())
	print((n + 1) // 2)


import math as np
for _ in range(int(input())):
	n = float(input())
	if n < 3:
		print(1)
	else:
		print(int(np.ceil(n / 2)))


n = int(input())
for i in range(n):
	print(int(input()) + 1 >> 1)


from sys import stdout
from collections import defaultdict
import math
t = int(input())
for _ in range(t):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


def f(n):
	if n & 1:
		return n // 2 + 1
	return n // 2
t = int(input())
for _ in range(t):
	n = int(input())
	print(f(n))


t = int(input())
for p in range(t):
	n = int(input())
	s = n // 2
	if n % 2 == 1:
		s = s + 1
	print(s)


import math
for __ in range(int(input())):
	b = int(input())
	print(math.ceil(b / 2))


import sys
input = sys.stdin.readline
Q = int(input())
Query = [int(input()) for _ in range(Q)]
for N in Query:
	print((N + 1) // 2)


def main():
	n = int(input())
	N = []
	for i in range(n):
		ne = int(input())
		if ne % 2 == 0:
			print(ne // 2)
		else:
			print(ne // 2 + 1)
main()


for i in range(int(input())):
	n = int(input())
	a = n % 2
	b = n // 2
	if a == 1:
		b += 1
	print(b)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	print(math.ceil(ii() / 2))


import math
t = int(input())
for i in range(t):
	temp = float(input())
	print(math.ceil(temp / 2))


import math
t = int(input())
cases = []
for i in range(t):
	cases.append(int(input()))

def solve(case):
	print(math.ceil(case / 2))
for case in cases:
	solve(case)


import math
t = int(input())
list = []
for x in range(1, t + 1):
	n = int(input())
	list.append(math.ceil(n / 2))
for x in list:
	print(x)


import sys
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(10000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	n = int(input())
	if n & 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


def tran(n):
	return int((n + 1) / 2)
t = int(input())
ans = []
for i in range(t):
	n = int(input())
	p = tran(n)
	ans.append(p)
for i in ans:
	print(i)


import math
case = int(input())
for i in range(0, case):
	n = int(input())
	answer = math.floor((n - 1) / 2) + 1
	print(answer)


def solve(n):
	return (n + 1) // 2
t = int(input())
for i_t in range(t):
	n = int(input())
	print(solve(n))


t = int(input())
while t > 0:
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		k = n + 1
		print(k // 2)
	t -= 1


import sys
infile = sys.stdin
next(infile)
for line in infile:
	n = int(line)
	ans = (n - 1) // 2 + 1
	print(ans)


from math import ceil
t = int(input())
for i in range(t):
	n = int(input())
	if n == 1:
		print(1)
		continue
	print(ceil(n / 2))


for tt in range(int(input())):
	n = int(input())
	ans = n // 2
	if n % 2:
		ans += 1
	print(ans)


from math import ceil as c
for _ in range(int(input())):
	n = int(input())
	print(c(n / 2))


import time, math, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x))

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 9 + 7

def solve():
	n = II()
	if n % 2 == 0:
		print(n // 2)
	else:
		print((n + 1) // 2)
t = II()
for i in range(t):
	solve()


import math
t = int(input())
while t:
	t -= 1
	i = int(input())
	ans = math.ceil(i / 2)
	print(ans)


from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
import io
import os
import math
import bisect

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n // i
	if n > 2:
		l.append(n)
	return l

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def digits(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def ceil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def mapin():
	return map(int, input().split())
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = int(input())
for _ in range(t):
	n = int(input())
	print(math.ceil(n / 2))


def getAns(n):
	return (n + 1) // 2

def main():
	t = int(input())
	anss = [0] * t
	for i in range(t):
		n = int(input())
		anss[i] = getAns(n)
	for ans in anss:
		print(ans)
main()


t = int(input())
list = []
for _ in range(1, t + 1):
	n = int(input())
	k = 1 + (n - 1) // 2
	list.append(k)
for _ in range(0, t):
	print(list[_])


LOVE = int(input())
while LOVE > 0:
	sex = int(input())
	print((sex + 1) // 2)
	LOVE -= 1


import math
t = int(input())

def fun(n):
	ans = math.floor(n / 2)
	if n % 2 == 0:
		print(int(ans))
	else:
		print(int(ans) + 1)
while t:
	t -= 1
	n = int(input())
	fun(n)


for _ in range(int(input())):
	n = int(input())
	c = n // 2
	if n % 2 == 1:
		c += 1
	print(c)


import math

def sticks(n):
	return math.ceil(n / 2)
for _ in range(int(input())):
	n = int(input())
	print(sticks(n))


import sys
import math
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
t = int(input())
for case in range(t):
	n = int(input())
	print((1 + n) // 2)


t = int(input())
for i in range(0, t):
	t = int(input())
	if t == 1:
		print('1')
	elif t % 2 == 0:
		print(t // 2)
	elif t % 2 != 0:
		print(t // 2 + 1)


import math
import os
import random
import re
import sys
from collections import OrderedDict

def solve():
	for _ in range(int(input())):
		n = int(input())
		print(math.ceil(n / 2))
solve()


a = int(input())
for i in range(a):
	b = int(input())
	if b % 2 == 0:
		print(b // 2)
	elif b == 1:
		print('1')
	elif b == 3:
		print('2')
	else:
		print(b // 2 + 1)


t = int(input())
s = []
for i in range(t):
	n = int(input())
	if n % 2 == 0:
		s.append(int(n / 2))
	elif n == 1:
		s.append(1)
	else:
		a = 2
		a += int((n - 3) / 2)
		s.append(a)
for j in range(t):
	print(s[j])


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	l = [I() for _ in range(n)]
	ans = []
	for x in l:
		ans.append((x - 1) // 2 + 1)
	for x in ans:
		print(x)
main()


t = int(input())
while t:
	n = int(input())
	x = n // 2
	if n % 2:
		print(x + 1)
	else:
		print(x)
	t = t - 1


import sys
tests = int(sys.stdin.readline().split()[0])
for test in range(tests):
	n = int(sys.stdin.readline().split()[0])
	if n % 2 != 0:
		print((n + 1) // 2)
	else:
		print(n // 2)


import sys
f_in = sys.stdin
f_out = sys.stdout
i = int(f_in.readline())
for i in range(i):
	a = int(f_in.readline())
	a = int((a + 1) / 2)
	f_out.write(str(a) + '\n')


def stick(n):
	if n <= 2:
		return 1
	elif n % 2 == 0:
		return int(n / 2)
	else:
		return int((n + 1) / 2)
test = int(input())
lst = []
for i in range(test):
	lst.append(int(input()))
for i in lst:
	print(stick(i))


for i in range(int(input())):
	s = int(input())
	if s % 2 == 1:
		f = s // 2 + 1
	else:
		f = s // 2
	print(f)


n = int(input())
for i in range(n):
	s = int(input())
	print((s - 1) // 2 + 1)


for i in range(1000):
	s = 0
	s = s + 1
for _ in range(int(input())):
	n = int(input())
	c = 1
	n = n - 1
	c = c + n // 2
	print(c)


time = int(input())
while time > 0:
	time = time - 1
	num = int(input())
	if num % 2 == 0:
		val = num // 2
		print(val)
	else:
		val = (num + 1) // 2
		print(val)


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		ans = (N - 1) // 2 + 1
		print(ans)
main()


import math

def shrey():
	n = int(input())
	ans = math.ceil(n / 2)
	print(ans)
T = input()
T = int(T)
for q in range(1, T + 1):
	shrey()


n = int(input())
while n:
	m = int(input())
	print(int((m + 1) / 2))
	n -= 1


cases = int(input())
for i in range(cases):
	n = int(input())
	rest = n - 1
	if n == 1 or n == 2:
		print(1)
	else:
		print(rest // 2 + 1)


from sys import stdin, stdout

def input():
	return stdin.readline()

def prin():
	return stdout.write(str(x) + '\n')
t = int(input())
for _ in range(t):
	n = int(input())
	if n & 1 == 1:
		x = n // 2 + 1
		print(x)
	else:
		x = (n - 1) // 2
		print(x + 1)


import math as mt
test = int(input())
for i in range(test):
	n = int(input())
	print(int(mt.ceil(n / 2)))


t = int(input())
for _ in range(t):
	n = int(input())
	rem = n - 1
	ans = rem // 2
	print(ans + 1)


a = int(input())
while a > 0:
	b = int(input())
	print((b + 1) // 2)
	a = a - 1


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def gift():
	for _ in range(t):
		n = int(input())
		yield (n // 2 + n % 2)
t = int(input())
ans = gift()
print(*ans, sep='\n')


t = int(input())
for i in range(t):
	a = int(input())
	if a == 1 or a == 2:
		print(1)
	else:
		res = (a - 1) // 2 + 1
		print(res)


def readintlst():
	return list(map(int, input().split(' ')))

def readn():
	return int(input())
N = readn()
for _ in range(N):
	n = readn() + 1
	print(n // 2)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
sys.setrecursionlimit(int(pow(10, 6)))
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
t = 1
t = int(input())
for _ in range(t):
	n = L()[0]
	if n == 1 or n == 2:
		print(1)
		continue
	if n == 3:
		print(2)
		continue
	print(n // 2 + n % 2)


import sys
import math

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
for _ in range(iinput()):
	n = iinput()
	print(math.ceil(n / 2))


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	print(math.ceil(n / 2))


import math as m
n = int(input())
arr = []
for i in range(n):
	q = int(input())
	arr.append(m.ceil(q / 2))
print(*arr, sep='\n')


import math
import sys
imput = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	print((n + 1) // 2)


n = int(input())
k = []
for i in range(n):
	k.append((int(input()) + 1) // 2)
for i in k:
	print(i)


cases = int(input(''))
output = []
for c in range(cases):
	list1 = []
	counter = 1
	x = int(input(''))
	if x == 1 or x == 2:
		output.append(1)
		continue
	elif x % 2 == 0:
		output.append(int(x / 2))
	else:
		output.append(int(x / 2) + 1)
print(*output, sep='\n')


import math
import collections
import sys
sys.setrecursionlimit(100000)

def inpu():
	return input().split(' ')

def inti(a):
	for i in range(len(a)):
		a[i] = int(a[i])
	return a

def inp():
	a = inpu()
	a = inti(a)
	return a
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


for test_case in range(int(input())):
	n = int(input())
	ans = 1
	if n <= 2:
		print(ans)
	else:
		print(ans + (n - 1) // 2)


for i in range(int(input())):
	print(0 - -int(input()) // 2)


def equalStickCount(n):
	return (n + 1) // 2
t = int(input())
for _ in range(t):
	n = int(input())
	print(equalStickCount(n))


for _ in range(int(input())):
	m = int(input())
	if m == 1 or m == 2:
		print(1)
	elif m % 2 == 0:
		print(int(m / 2))
	elif m % 2 != 0:
		print(int(m / 2) + 1)


import math

def string_split_to_list(name):
	return name.split(' ')

def next_numb(name):
	datei_list = string_split_to_list(name)
	for element in datei_list:
		try:
			zahl = int(element)
			yield zahl
		except Exception:
			try:
				zahl = float(element)
				yield zahl
				continue
			except Exception:
				continue
	return
t = int(input())
for i in range(t):
	l = (int(input()) - 1) // 2 + 1
	print(l)


t = int(input())
for _ in range(t):
	s = int(input())
	p = (s - 1) // 2
	print(p + 1)


n = int(input())
for i in range(n):
	num = int(input())
	print(int((num + 1) / 2))


t = int(input())
for i in range(0, t):
	n = int(input())
	print(n // 2 + n % 2)


for i in ' ' * int(input()):
	a = int(input())
	print(a // 2 + a % 2)


def main():
	(n,) = map(int, input().split(' '))
	return n // 2 + n % 2
for _ in range(int(input())):
	print(main())


from math import ceil as c
for x in range(int(input())):
	a = int(input())
	print(c(a / 2))


n = int(input())
answer = ''
for i in range(0, n):
	sticks = int(input())
	if sticks < 2:
		answer = answer + '1\n'
	elif sticks % 2 == 1:
		answer = answer + str(int(sticks // 2) + 1) + '\n'
	else:
		answer = answer + str(int(sticks // 2)) + '\n'
print(answer)


q = int(input())
for i in range(q):
	x = int(input())
	print((x + 1) // 2)


import math
for _ in range(int(input())):
	a = int(input())
	print(math.ceil(a / 2))


import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal

def s():
	return input()

def i():
	return int(input())

def S():
	return input().split()

def I():
	return map(int, input().split())

def L():
	return list(input().split())

def l():
	return list(map(int, input().split()))

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 9
mod = 10 ** 9 + 7
t = i()
for j in range(t):
	a = i()
	if a % 2 == 0:
		print(a // 2)
	else:
		print(a // 2 + 1)


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
for i in range(INT()):
	n = INT()
	if n == 1:
		print(1)
	else:
		print(math.ceil(n / 2))


import math
for tests in range(int(input())):
	print(math.ceil(int(input()) / 2))


import math as M
for i in range(int(input())):
	ask = int(input())
	print(int(M.ceil(ask / 2)))


import sys, math, os
from io import BytesIO, IOBase
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write(' '.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
INF = 10 ** 9
mod = 998244353
for t in range(int(data())):
	n = int(data())
	ans = n // 2 + n % 2
	print(ans)


trails = int(input())
for x in range(trails):
	number = int(input())
	dec = number // 2
	if number % 2 == 1:
		print(int(dec + 1))
	else:
		print(int(dec))


t = int(input())
p = []
for i in range(t):
	y = int(input())
	p.append(y)

def oe(a):
	if a == 1:
		return 1
	elif a % 2 == 0:
		return a // 2
	elif a % 2 == 1:
		return (a + 1) // 2
for i in range(t):
	r = oe(p[i])
	print(r)


t = int(input())
l = []
for i in range(t):
	x = int(input())
	l.append(x)
for e in l:
	if e % 2 == 0:
		print(int(e / 2))
	else:
		print(int((e - 1) / 2 + 1))


import sys
from collections import Counter
from collections import defaultdict
from collections import deque
t = int(input())
for i in range(t):
	n = int(input())
	if n % 2:
		print(int(1 + (n - 1) / 2))
	else:
		print(int(n / 2))


try:
	n = int(input())
	for i in range(n):
		t = int(input())
		if t % 2 == 0:
			print(t // 2)
		else:
			print(t // 2 + 1)
except EOFError as e:
	pass


from sys import stdin, stdout
from collections import Counter
t = int(stdin.readline().strip())
for _ in range(t):
	n = int(stdin.readline().strip())
	if n == 1:
		stdout.write(str(n) + '\n')
	elif n == 2:
		stdout.write(str(1) + '\n')
	elif n == 3:
		stdout.write(str(2) + '\n')
	elif n % 2 == 0:
		stdout.write(str(n // 2) + '\n')
	else:
		stdout.write(str((n + 1) // 2) + '\n')


t = int(input())
for i in range(t):
	k = int(input())
	if k < 3:
		print(1)
	elif k % 2 == 0:
		f = int(k / 2)
		print(f)
	else:
		g = int((k + 1) / 2)
		print(g)


import math
from collections import deque
from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	x = int(input())
	print(int(math.ceil(x / 2)))


for i in range(int(input())):
	n = int(input())
	seen = set()
	output = set()
	ans = 0
	if n == 1 or n == 2:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


t = input()
t = int(t)
for i in range(t):
	n = input()
	n = int(n)
	n_new = n * (n + 1) // (2 * n)
	print(n_new)


import math
n1 = int(input())
for x in range(n1):
	n2 = int(input())
	print(math.ceil(n2 / 2))


from math import *
t = int(input())
for _ in range(t):
	a = int(input())
	if a == 1:
		print(1)
		continue
	if a == 3:
		print(2)
		continue
	print(ceil(a / 2))


t = int(input(''))
for i in range(t):
	k = int(input(''))
	v = int((k + 1) / 2)
	print(v)


from sys import stdin, stdout
import math, queue, heapq
fastinput = stdin.readline
fastout = stdout.write
t = int(fastinput())
while t:
	t -= 1
	n = int(fastinput())
	print((n + 1) // 2)


from math import *

def r1(t):
	return t(input())

def r2(t):
	return [t(i) for i in input().split()]
for _ in range(r1(int)):
	n = r1(int)
	print((n + 1) // 2)


for __ in range(int(input())):
	n = int(input())
	print((n + 1) // 2)


rr = lambda : input().strip()
T = int(rr())
for _ in range(T):
	n = int(rr())
	ans = 0
	if n < 3:
		ans = 1
	else:
		ans = n // 2 + n % 2
	print(ans)


t = int(input())
for case in range(t):
	n = int(input())
	print(n // 2 + n % 2)


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	print(n // 2 + (n % 2 != 0))


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = []
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors.append(i)
			n //= i
		i += 1
	if n > 1:
		factors.append(n)
	return factors

def vars():
	return map(int, input().split())

def array():
	return list(map(int, input().split()))

def c(n, r):
	return math.factorial(n) / (math.factorial(n - r) * math.factorial(r))

def main():
	n = int(input())
	print(n // 2 + n % 2)
t = int(input())
for _ in range(t):
	main()


T = int(input())
while T > 0:
	n = int(input())
	if n % 2 == 0:
		print(int(n / 2))
	else:
		print(int((n + 1) / 2))
	T -= 1


import math
n = int(input())
for x in range(1, n + 1):
	a = int(input())
	if a % 2 == 0:
		print(int(a / 2))
	else:
		print(math.ceil(a / 2))


import sys
input = sys.stdin.readline

def print(val):
	sys.stdout.write(str(val) + '\n')

def prog():
	for _ in range(int(input())):
		n = int(input())
		print((n + 1) // 2)
prog()


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
for i in range(mint()):
	n = mint()
	print((n + 1) // 2)


import sys
import math
strInp = lambda : input().strip().split()
intInp = lambda : list(map(int, strInp()))
for t in range(int(input())):
	n = int(input())
	print((n - 1) // 2 + 1)


testcases = int(input())
for testcase in range(testcases):
	n = int(input())
	if n == 1 or n == 2:
		print('1')
		continue
	if n == 3 or n == 4:
		print('2')
		continue
	if n & 1 == 1:
		n += 1
		print(n >> 1)
	else:
		print(n >> 1)


import math
for q in range(int(input())):
	print(math.ceil(int(input()) / 2))


from math import gcd
import sys
t = int(input())

def inp():
	return sys.stdin.readline().strip()
for _ in range(t):
	n = int(inp())
	print(n // 2 if n % 2 == 0 else n // 2 + 1)


from sys import stdin
import math
A = int(stdin.readline())
for t in range(0, A):
	B = int(stdin.readline())
	print(int(math.ceil(B / 2)))


t = int(input())
while t > 0:
	inp = int(input())
	if inp % 2 == 0:
		print(inp // 2)
	else:
		print(inp // 2 + 1)
	t -= 1


import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
from collections import defaultdict
con = 10 ** 9 + 7
INF = float('inf')

def getlist():
	return list(map(int, input().split()))

def main():
	T = int(input())
	for _ in range(T):
		N = int(input())
		if N % 2 == 1:
			ans = int(N // 2) + 1
		else:
			ans = int(N // 2)
		print(ans)
main()


def read_int():
	return int(input())

def read_ints():
	return map(int, input().split(' '))
t = read_int()
for case_num in range(t):
	n = read_int()
	print((n - 1) // 2 + 1)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime
from collections import deque
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for _ in range(int(input())):
		n = ri()
		z = (n + 1) // 2
		wi(z)

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


import sys, collections, math

def in_out():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	n = int(input())
	if n % 2 != 0:
		print(n // 2 + 1)
	else:
		print(n // 2)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	print(int(n / 2 + 0.5))


import os, io
from sys import stdout
import collections
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
from collections import Counter

def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r
t = int(input())
for _ in range(t):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	i = 1
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


def main(n):
	return (n + 1) // 2
for _ in range(int(input())):
	print(main(int(input())))


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
for _ in range(Int()):
	n = Int()
	ans = 0
	if n % 2:
		n -= 1
		ans = 1
	ans += n // 2
	print(ans)


from math import ceil
from sys import stdin
input()
for i in stdin:
	print(ceil(int(i) / 2))


from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	n = int(input())
	print(ceil(n / 2))


input = __import__('sys').stdin.readline
for _ in range(int(input())):
	n = int(input())
	print(n // 2 + n % 2)


import sys
import math
input = sys.stdin.readline
from collections import deque
from queue import LifoQueue
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print((n - 1) // 2 + 1)


import math
for i in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(math.ceil(n / 2))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	n = int(ri())
	if n == 1:
		print(1)
	else:
		print(ceil(n / 2))


n = int(input())
a = []
for i in range(n):
	b = int(input())
	a.append((b - 1) // 2 + 1)
print(*a, sep='\n')


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	print((n + 1) // 2)


t = int(input())
for j in range(t):
	n = int(input())
	if n == 2 or n == 1:
		print(1)
	else:
		print((n + 1) // 2)


def makeSticks(n):
	if n % 2 == 0:
		return n // 2
	else:
		return n // 2 + 1
t = int(input())
while t:
	n = int(input())
	print(makeSticks(n))
	t -= 1


from sys import stdin
(t, out) = (next(stdin), list())
for n in stdin:
	out.append(int(n) + 1 >> 1)
print(*out, sep='\n')


def any():
	n = int(input())
	if n % 2 != 0:
		print((n - 1) // 2 + 1)
	else:
		print(n // 2)
for t in range(int(input())):
	any()


import math
import datetime
import collections
import statistics
import itertools

def is_prime(num):
	for i in range(2, int(math.sqrt(num)) + 1):
		if num % i == 0:
			return False
	return True

def input_list():
	ll = list(map(int, input().split(' ')))
	return ll
tc = int(input())
for _ in range(tc):
	num = int(input())
	l = num / 2
	print(math.ceil(l))


t = int(input())
import math
for r in range(t):
	n = int(input())
	c = 0
	print(math.ceil(n / 2))


from collections import defaultdict as dd
from collections import Counter
from math import log, ceil

def solve():
	n = int(input())
	print(ceil(n / 2))
t = 1
t = int(input())
for _ in range(t):
	solve()


from math import ceil

def main():
	for _ in range(int(input())):
		n = int(input())
		print(ceil(n / 2))
main()


t = int(input())
arr = []
for i in range(t):
	n = int(input())
	arr.append(n)
	if n == 1 or n == 2:
		print('1')
	elif n % 2 == 0:
		x = int(n / 2)
		print(x)
	else:
		x = int(n / 2)
		print(x + 1)


from collections import defaultdict as dd
import sys
input = sys.stdin.readline
t = int(input())
while t:
	n = int(input())
	if n % 2:
		print(n // 2 + 1)
	else:
		print(n // 2)
	t -= 1


import sys
from sys import stdin
input = sys.stdin.readline

def cei(x, y):
	if int(x / y) == x / y:
		return x // y
	else:
		return x // y + 1
for _ in range(int(input())):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
		continue
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


t = int(input())
j = 0
while j < t:
	n = int(input())
	print((n + 1) // 2)
	j = j + 1


a = int(input())
c = []
for i in range(a):
	b = int(input())
	if b % 2 == 0:
		d = int(b / 2)
		c.append(d)
	else:
		d = int((b + 1) / 2)
		c.append(d)
for j in range(a):
	print(c[j])


t = int(input())
for j in range(t):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(1)
	elif n == 3:
		print(2)
	else:
		ans = int(n / 2)
		if n % 2 != 0:
			ans += 1
		print(ans)


for p in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 2)


import math

def solve():
	n = int(input())
	return math.ceil(n / 2)
T = int(input())
for case in range(T):
	print(solve())


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	print(math.ceil(n / 2))


tc = int(input())
for ctr in range(tc):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


from sys import stdin

def input():
	return stdin.readline()
T = int(input())
for _ in range(T):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


from sys import stdin
input = lambda : stdin.readline().rstrip('\r\n')
from collections import deque as que
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
Testcase = inin()
for _ in range(Testcase):
	n = inin()
	print((n - 1) // 2 + 1)


from math import ceil
t = int(input())
L = []
for i in range(t):
	n = int(input())
	L.append(ceil(n / 2))
for l in L:
	print(l)


def main():
	t = int(input())
	for case in range(t):
		n = int(input())
		print(int((n - 1) / 2) + 1)
main()


import math

def function(n):
	return math.ceil(n / 2)
a = int(input())
arr = []
while a:
	b = int(input())
	arr.append(function(b))
	a -= 1
for i in arr:
	print(i)


import math
t = int(input())
lista = []
for i in range(t):
	n = int(input())
	lista.append(math.floor((n + 1) / 2))
for i in lista:
	print(i)


t = int(input())
n = []
for i in range(t):
	n.append(int(input()))
r = []
for i in n:
	if i == 1 | i == 2:
		r.append(1)
	elif i % 2 == 1:
		r.append(int(i / 2 + 1))
	else:
		r.append(int(i / 2))
for i in r:
	print(i)


for ii in range(int(input())):
	n = int(input())
	print((n + 1) // 2)


t = int(input())
l = []
for i in range(0, t):
	s = int(input())
	l.append(s)
for i in l:
	print((i - 1) // 2 + 1)


t = int(input())
results = []
for i in range(t):
	desc = int(input())
	if desc % 2 == 0:
		results.append(int(desc / 2))
	else:
		results.append(int((desc + 1) / 2))
for i in results:
	print(i)


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	n = inp()
	if n == 1:
		pr(1)
	else:
		z = math.ceil(n / 2)
		pr(z)
for _ in range(inp()):
	solve()


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))

def solve():
	n = I()
	ans = 1
	print(math.ceil(n / 2))
for i in range(I()):
	solve()


n = int(input())
for i in range(n):
	a = int(input())
	print(int((a + 1) / 2))


for x in [*open(0)][1:]:
	print((int(x) + 1) // 2)


from sys import stdin
input = lambda : stdin.readline().strip()
char = [chr(i) for i in range(97, 123)]
CHAR = [chr(i) for i in range(65, 91)]
mp = lambda : list(map(int, input().split()))
INT = lambda : int(input())
rn = lambda : range(INT())
from math import ceil, sqrt, factorial, gcd
for _ in rn():
	n = INT()
	print(ceil(n / 2))


import sys
input = sys.stdin.readline

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()

def lower_letters():
	lowercase = [chr(i) for i in range(97, 97 + 26)]
	return lowercase

def how_frequent(lis):
	last = None
	count = []
	each = 1
	for i in range(len(lis)):
		if last != None:
			last = lis[i - 1]
		if last == lis[i]:
			each += 1
		else:
			count.append(each)
			each = 0
		last = lis[i]
	return max(count)

def upper_letters():
	uppercase = [chr(i) for i in range(65, 65 + 26)]
	return uppercase
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import os
import sys
debug = True
if debug and os.path.exists('input.in'):
	input = open('input.in', 'r').readline
else:
	debug = False
	input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
test_count = inp()
for t in range(test_count):
	if debug:
		print('Test Case #', t + 1)
	n = inp()
	print((n + 1) // 2)


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	N = int(stdin.readline())
	print((N + 1) // 2)


for ti in range(int(input())):
	n = int(input())
	if n > 2 and n % 2 == 1:
		print(n // 2 + 1)
	elif n > 2 and n % 2 == 0:
		print(n // 2)
	else:
		print(1)


def magical(n):
	if n & 1:
		return n // 2 + 1
	else:
		return n // 2
t = int(input())
for _ in range(t):
	n = int(input())
	print(magical(n))


t = int(input())
for i in range(t):
	s = int(input())
	print((s + 1) // 2)


def fun():
	n = int(input())
	if int(n / 2) == n / 2:
		return int(n / 2)
	else:
		return int(n / 2) + 1
for _ in range(int(input())):
	print(fun())


import math
t = int(input())
for g in range(t):
	n = int(input())
	if n <= 2:
		print(1)
		continue
	print(1 + (n - 1) // 2)


def main():
	t = int(input())
	for __ in range(t):
		n = int(input())
		if n <= 2:
			print(1)
		elif n > 2 and n <= 4:
			print(2)
		elif n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
main()


q = int(input())
while q > 0:
	n = int(input())
	print(n // 2 + n % 2)
	q -= 1


from sys import stdin, stdout
import math
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))
(t,) = mp()
for _ in range(t):
	(n,) = mp()
	cout(str(math.ceil(n / 2)) + '\n')


import math

def MagicalSticks(n):
	return math.ceil(n / 2)
Lista = []
total = int(input())
for i in range(total):
	Lista.append(int(input()))
for j in Lista:
	print(MagicalSticks(j))


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
tc = ii1()
for _ in range(tc):
	n = ii1()
	tot = n * (n + 1) // 2
	print(tot // n)


import math
t = int(input())
rez = []
for i in range(t):
	n = int(input())
	rez.append(int(n + 1) // 2)
for i in range(len(rez)):
	print(rez[i])


t = int(input())
for _ in range(t):
	arr = []
	x = int(input())
	if x % 2 == 0:
		print(x // 2)
	else:
		print(x // 2 + 1)


def f(n):
	count = 1
	n = n - 1
	if n % 2 == 0:
		count += n // 2
	else:
		count += (n - 1) // 2
	return count
t = int(input())
for i in range(t):
	n = int(input())
	print(f(n))


import string
import math
test = int(input())
for i in range(test):
	x = int(input())
	if x % 2 == 1:
		print(int(x / 2) + 1)
	else:
		print(int(x / 2))


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def ans(n):
	if n % 2 == 0:
		answer = n / 2
	else:
		answer = int(n / 2) + 1
	print(int(answer))
	return 0
test = inp()
answer = 0
for i in range(0, test):
	n = inp()
	answer = ans(n)


for iota in range(int(input())):
	n = int(input())
	print(n + 1 >> 1)


t = int(input())
answer = []
for i in range(t):
	x = int(input())
	if x % 2 == 0:
		answer.append(x // 2)
	else:
		answer.append(x // 2 + 1)
for item in answer:
	print(item)


def read_list():
	return list(map(int, input().strip().split(' ')))

def print_list(l):
	print(' '.join(map(str, l)))
N = int(input())
for _ in range(N):
	n = int(input())
	print((n & 1) + (n >> 1))


for ii in range(int(input())):
	n = int(input())
	ans = n // 2
	if n % 2 == 0:
		print(ans)
	else:
		print(ans + 1)


import sys
import math
import collections
import heapq

def set_debug(debug_mode=False):
	if debug_mode:
		fin = open('input.txt', 'r')
		sys.stdin = fin

def int_input():
	return list(map(int, input().split()))
t = int(input())
for ti in range(1, t + 1):
	n = int(input())
	print((n + 1) // 2)


import math

def magicalSticks():
	sticks = int(input())
	if sticks == 1:
		print(1)
	elif sticks % 2 == 1:
		print(int(math.ceil(sticks / 2)))
	elif sticks % 2 == 0:
		print(int(sticks // 2))
cases = range(int(input()))
for case in cases:
	magicalSticks()


def nod(a, b):
	while a != b:
		(a, b) = (max(a, b), min(a, b))
		if a % b == 0:
			a -= (a // b - 1) * b
		else:
			a -= a // b * b
	return a
for t in range(int(input())):
	print((int(input()) + 1) // 2)


from sys import stdin, setrecursionlimit, stdout
setrecursionlimit(1000000)
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heappushpop, heapreplace

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
res = ['YES', 'NO']
test_case = ii()
while test_case:
	test_case -= 1
	n = ii() + 1
	print(n // 2)


TC = int(input())
for _ in range(TC):
	x = int(input())
	print((x + 1) // 2)


from __future__ import division, print_function
import os, sys
import math
import collections
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(n - r))

def binary_search(arr, low, high, x):
	if high >= low:
		mid = (high + low) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binary_search(arr, low, mid - 1, x)
		else:
			return binary_search(arr, mid + 1, high, x)
	else:
		return -1

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def padded_bin_with_complement(x):
	if x < 0:
		return bin(2 ** 16 - abs(x))[2:].zfill(16)
	else:
		return bin(x)[2:].zfill(16)

def binaryToDecimal(binary):
	binary1 = binary
	(decimal, i, n) = (0, 0, 0)
	while binary != 0:
		dec = binary % 10
		decimal = decimal + dec * pow(2, i)
		binary = binary // 10
		i += 1
	print(decimal)

def CountFrequency(arr):
	return collections.Counter(arr)

def pos(a):
	b = [0] * len(a)
	c = sorted(a)
	for i in range(len(a)):
		for j in range(len(a)):
			if c[j] == a[i]:
				b[i] = j
				break
	return b

def smallestDivisor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			return i
		i += 2
	return n

def commonn(a, b, n):
	c = []
	for i in range(n):
		if a[i] == b[i]:
			c.append('-1')
		else:
			c.append(b[i])
	return c

def primeFactors(n):
	j = []
	while n % 2 == 0:
		j.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			j.append(int(n))
			n = n / i
	if n > 2:
		j.append(int(n))
	return j

def main():
	for _ in range(ii()):
		n = ii()
		print(math.ceil(n / 2))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for x in range(int(input())):
	n = int(input())
	if n < 3:
		print(1)
	elif n == 3:
		print(2)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


for i in range(int(input())):
	x = int(input())
	ans = 0
	ans = (x + 1) // 2
	print(ans)


def f():
	n = int(input())
	ans = n // 2 + n % 2
	print(ans)
for t in range(int(input())):
	f()


def main():
	t = Iint()
	for _ in range(t):
		n = Iint()
		if n % 2 == 0:
			print(n // 2)
		else:
			print(n // 2 + 1)
FIO = 1

def I():
	return input()

def Iint():
	return int(input())

def Ilist():
	return list(map(int, input().split()))

def Imap():
	return map(int, input().split())

def Plist(li, s=' '):
	print(s.join(map(str, li)))
en = enumerate
if not FIO:
	if __name__ == '__main__':
		main()
		exit()
else:
	from io import BytesIO, IOBase
	import sys
	import os
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


import sys
first = 1
from math import gcd
for line in sys.stdin:
	values = list(map(int, line.split()))
	if first == 1:
		first = 0
		continue
	n = values[0]
	print((n + 1) // 2)


def NO():
	return print('NO')

def YES():
	return print('YES')

def INT():
	return int(input())

def LIST():
	return list(map(int, input().split()))

def STR():
	return input()

def MAP():
	return map(int, input().split())
for _ in range(INT()):
	n = INT()
	if n == 1:
		print(1)
	elif n == 3:
		print(2)
	elif not n & 1:
		print(n // 2)
	else:
		print(n // 2 + 1)


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
for _ in range(inp()):
	n = inp()
	print((n - 1) // 2 + 1)


from sys import stdin, stdout
INF = 100000000000.0

def get_int():
	return int(stdin.readline().strip())

def get_ints():
	return map(int, stdin.readline().strip().split())

def get_array():
	return list(map(int, stdin.readline().strip().split()))

def get_string():
	return stdin.readline().strip()
from collections import defaultdict
for _ in range(int(stdin.readline())):
	n = get_int()
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(n // 2)
	else:
		print(n // 2 + 1)


import sys
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
getS = lambda : input().strip()
getN = lambda : int(input())
getList = lambda : list(map(int, input().split()))
getZList = lambda : [int(x) - 1 for x in input().split()]
INF = 10 ** 20
MOD = 1000000007

def solve():
	n = getN()
	sticks = []
	for i in range(n):
		print((getN() + 1) // 2)

def main():
	n = getN()
	for _ in range(n):
		solve()
solve()


t = int(input())

def f(num):
	s = 1
	if num < 7:
		for i in range(1, num):
			for j in range(1 + i, num):
				if i + j == num:
					s += 1
	elif num % 2 == 0:
		s = num // 2
	else:
		s = num // 2 + 1
	return s
for i in range(0, t):
	n = int(input())
	s = f(n)
	print(s)


from sys import stdin, stdout
from bisect import bisect, bisect_left, bisect_right

def gt():
	return map(int, stdin.readline().split())

def gi():
	return int(stdin.readline())

def gl():
	return list(map(int, stdin.readline().split()))

def gs():
	return stdin.readline()
t = gi()
for _ in range(t):
	n = gi()
	print((n + 1) // 2)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	print((n + 1) // 2)


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	n = inin()
	print(math.ceil(n / 2))


from collections import defaultdict
import math

def number():
	return 1 + (n - 1) // 2
for i in range(int(input())):
	global n
	n = int(input())
	print(number())


a = int(input())
for _ in range(a):
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	elif n % 2 == 0:
		p = n - 2
		print(int(p / 2) + 1)
	else:
		b = n - 1
		print(int(b / 2) + 1)


N = int(input())
for x in range(N):
	n = int(input())
	import math
	print(math.ceil(n / 2))


t = int(input())
for inh in range(0, t):
	n = int(input())
	n -= 1
	ans = 1
	ans += n // 2
	print(ans)


TC = int(input())
for tc in range(TC):
	N = int(input())
	print(-(-N // 2))


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
N = 10 ** 9 + 7
for _ in range(I()):
	print((I() + 1) // 2)


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')

def solve(n):
	return (n + 1) // 2

def main():
	for _ in range(ri()):
		n = ri()
		wi(solve(n))
main()


t = int(input())
for _ in range(t):
	p = int(input())
	if p % 2 == 0:
		print(p // 2)
	else:
		print((p - 1) // 2 + 1)


import sys
input = sys.stdin.readline
for f in range(int(input())):
	print((int(input()) + 1) // 2)


import sys, math
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
T = int(wtf[0])
assert T >= 1 and T <= 1000, 'Precondition failure'
for t in wtf[1:]:
	n = int(t)
	print(n if n == 1 else math.ceil(n / 2))


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
import bisect as bi
import heapq
from os import path
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())

	def yes():
		print('YES')

	def no():
		print('NO')
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def retdic(l):
	d = {}
	for x in l:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def main():
	try:
		n = I()
		print(math.ceil(n / 2))
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


n = int(input())
for i in range(n):
	m = int(input())
	k = m // 2 + m % 2
	print(k)


import io
import os
from collections import Counter, defaultdict, deque

def solve(N):
	if N % 2 == 0:
		return N // 2
	else:
		return 1 + N // 2
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
T = int(input())
for t in range(T):
	(N,) = [int(x) for x in input().split()]
	ans = solve(N)
	print(ans)


test_cases = int(input())
t = list()
for ii in range(test_cases):
	n = int(input())
	if n % 2 == 0:
		count = n // 2
		count = max(count, 1)
	else:
		count = n // 2 + 1
		count = max(count, 1)
	print(count)