One evening Rainbow Dash and Fluttershy have come up with a game. Since the ponies are friends, they have decided not to compete in the game but to pursue a common goal. 

The game starts on a square flat grid, which initially has the outline borders built up. Rainbow Dash and Fluttershy have flat square blocks with size $1\times1$, Rainbow Dash has an infinite amount of light blue blocks, Fluttershy has an infinite amount of yellow blocks. 

The blocks are placed according to the following rule: each newly placed block must touch the built on the previous turns figure by a side (note that the outline borders of the grid are built initially). At each turn, one pony can place any number of blocks of her color according to the game rules.

Rainbow and Fluttershy have found out that they can build patterns on the grid of the game that way. They have decided to start with something simple, so they made up their mind to place the blocks to form a chess coloring. Rainbow Dash is well-known for her speed, so she is interested in the minimum number of turns she and Fluttershy need to do to get a chess coloring, covering the whole grid with blocks. Please help her find that number!

Since the ponies can play many times on different boards, Rainbow Dash asks you to find the minimum numbers of turns for several grids of the games.

The chess coloring in two colors is the one in which each square is neighbor by side only with squares of different colors.


-----Input-----

The first line contains a single integer $T$ ($1 \le T \le 100$): the number of grids of the games. 

Each of the next $T$ lines contains a single integer $n$ ($1 \le n \le 10^9$): the size of the side of the grid of the game. 


-----Output-----

For each grid of the game print the minimum number of turns required to build a chess coloring pattern out of blocks on it.


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

Output
2
3



-----Note-----

For $3\times3$ grid ponies can make two following moves: [Image]

Difficulty: EASY
Tags: Mathematics

Greedy algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
import math
t = int(input())
for i in range(t):
	x = int(input())
	if x == 1:
		print(1)
	else:
		ans = (x - 2) // 2 + 2
		print(ans)


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


t = int(input())
s = 0
while t != 0:
	n = int(input())
	s = int((n + 2) / 2)
	print(s)
	print('\n')
	t = t - 1


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()
		if n == 1:
			print(1)
		elif n == 2:
			print(2)
		elif n % 2 == 1:
			print((n - 1) // 2 + 1)
		else:
			print((n - 2) // 2 + 2)
		pass
solve()


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


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


print(*[int(input()) // 2 + 1 for _ in range(int(input()))], sep='\n')


for _ in [0] * int(input()):
	n = int(input())
	print(n // 2 + 1)


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


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


t = int(input())

def minMoves(n):
	if n == 1:
		return 1
	if n == 2:
		return 2
	if n == 3:
		return 2
	if n == 4:
		return 3
	if n == 5:
		return 3
	if n == 6:
		return 4
	return 1 + n // 2
for _ in range(t):
	n = int(input())
	print(minMoves(n))


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


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


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')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 1000000007

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 = 1
	ans += n // 2
	print(ans)


def min_turns_even(i: int):
	print(i // 2 + 1)

def min_turns_odd(i: int):
	print((i + 1) // 2)
n = int(input())
items = []
for i in range(n):
	items.append(int(input()))
for item in items:
	if item % 2 == 0:
		min_turns_even(item)
	else:
		min_turns_odd(item)


import math

def ans(N):
	return N // 2 + 1
T = int(input())
for t in range(T):
	N = int(input())
	print(ans(N))


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


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


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


from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop

def func(n):
	if n == 1:
		return 1
	if n % 2 == 0:
		return (n - 4) // 2 + 3
	return (n - 3) // 2 + 2
t = int(input())
for i in range(t):
	n = int(input())
	print(func(n))


n = int(input())
for i in range(n):
	a = int(input())
	print((a + 2) // 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())
	print(n // 2 + 1)


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


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


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


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


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


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


import sys
input = sys.stdin.buffer.readline
from collections import deque as que, defaultdict as vector
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	n = inin()
	print(n // 2 + 1)


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


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


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


import math
t = int(input())
list_ans = []
for i in range(t):
	x = int(input())
	cnt = 2
	if x % 2 == 0:
		z = (x - 2) / 2
		cnt += z
	else:
		z = (x - 3) / 2
		cnt += z
	list_ans.append(cnt)
for i in range(len(list_ans)):
	print(int(list_ans[i]))


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


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


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


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


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


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


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


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


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


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 // 2 + 1)


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


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

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

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

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

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


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


import io
import os
from collections import Counter, defaultdict, deque

def solve(N):
	if N == 2:
		return 2
	D = (N + 1) // 2
	if N % 2 == 0:
		return D + 1
	else:
		return D
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
for tc in range(1, TC + 1):
	(N,) = [int(x) for x in input().split()]
	ans = solve(N)
	print(ans)


(z, zz, dgraphs) = (input, lambda : list(map(int, z().split())), {})
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
n = int(z())
for _ in range(n):
	nn = int(z())
	print(nn // 2 + 1)


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


import sys
m = int(input())
for l in range(m):
	n = int(sys.stdin.readline())
	print(n // 2 + 1)


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


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


from math import ceil

def main():
	for t in range(int(input())):
		n = int(input())
		print(ceil((n + 1) / 2))
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 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(n // 2 + 1)


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


t = input()
t = int(t)
for i in range(t):
	n = input()
	n = int(n)
	x = (n - 1) / 2
	if x.is_integer():
		d = x + 1
	if x.is_integer() == False:
		x = int(x)
		d = x + 2
	print(int(d))


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


import sys
T = int(sys.stdin.readline().strip())
for t in range(0, T):
	n = int(sys.stdin.readline().strip())
	print((n + 2) // 2)


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


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


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


mod = 10 ** 9 + 7
inf = 1 << 60

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

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


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


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


def solve(n):
	print((n + 1) // 2 + (n + 1) % 2)

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


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


from sys import stdin
input = stdin.readline
import math
lines = int(input())
for x in range(lines):
	num = int(input())
	if num % 2 == 0:
		print(int(num / 2 + 1))
	else:
		number = int(math.ceil(num / 2))
		print(number)


import math as mt
import sys, string
input = sys.stdin.readline
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input().strip())
	print(n // 2 + 1)


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


import math
t = int(input())
for g in range(t):
	n = int(input())
	if n <= 2:
		print(n)
	elif n == 3:
		print(2)
	elif n == 4:
		print(3)
	else:
		print(n // 2 + 1)


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


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 + 1) / 2))


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


import sys, math
input = sys.stdin.readline
t = int(input())
for r in range(t):
	n = int(input())
	if n == 1:
		print(1)
	else:
		print(n // 2 + 1)


def mai(x):
	if n == 1:
		print(1)
	elif n == 2:
		print(2)
	else:
		print(n // 2 + 1)
num = int(input())
for i in range(num):
	n = int(input())
	mai(n)


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


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


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


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
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 test():
	a = int(input())
	return a // 2 + 1
t = int(input())
for _ in range(t):
	print(test())


N1 = int(input())
while N1 > 0:
	N = int(input())
	print(N // 2 + 1)
	N1 -= 1


def f(x):
	if x == 1:
		return 1
	i = x // 2
	return i + 1
	if x % 2 == 0:
		return i + 1
	else:
		j = (i - 1) // 2
		k = i % 2
		ret = 2 + j * 3
		if k == 0:
			ret += 1
		return ret
for i in range(int(input())):
	n = int(input())
	print(f(n))


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


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 1:
		print('1')
		continue
	if n <= 3:
		print('2')
		continue
	else:
		ans = 1 + n // 2
		print(ans)


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


from sys import stdin, stdout
import math
from collections import Counter, deque
L = lambda : deque(list(map(int, stdin.readline().strip().split())))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
IN = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()
mod = 1000000007

def s(a):
	print(''.join(list(map(str, a))))

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


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


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	if n % 2 == 1:
		n -= 1
	print(n // 2 + 1)


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


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


import math

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


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


t = int(input())
d = {}
for i in range(t):
	n = int(input())
	d[i] = n
for key in d.keys():
	if d[key] == 1:
		print(1)
	if d[key] / 2 == d[key] // 2 and d[key] != 2:
		print(int(d[key] / 2 + 1))
	if d[key] / 2 == d[key] // 2 and d[key] == 2:
		print(2)
	if d[key] / 2 != d[key] // 2 and d[key] != 1:
		print(int(d[key] // 2 + 1))


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


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


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


import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve(k):
	console('----- solving ------')
	console(k)
	return (k + 2) // 2

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	return
for case_num in range(int(input())):
	k = int(input())
	res = solve(k)
	print(res)


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


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


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


import os
import sys
from io import BytesIO, IOBase
import threading
from collections import Counter
import heapq
from math import ceil, floor

def main():
	n = int(input())
	if n % 2 == 1:
		print(n // 2 + 1)
	else:
		print(n // 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')
for i in range(int(input())):
	main()


from collections import deque
from sys import stdin
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
(t,) = gil()
for _ in range(t):
	(n,) = gil()
	print(n // 2 + 1)


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


test = int(input())

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


from math import *
for _ in range(int(input())):
	num = int(input())
	print(1 + num // 2)


a = int(input())
b = 0
while b < a:
	c = int(input())
	print(c // 2 + 1)
	b = b + 1


import math
cases = int(input())
while cases:
	cases -= 1
	num = int(input())
	print(math.ceil((num + 1) / 2))


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


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)
pr = lambda x: print(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 0 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
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	n = I()
	x = n // 2 + 1
	print(x)


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


import sys

def main():
	T = int(sys.stdin.readline())
	for t in range(T):
		n = int(sys.stdin.readline())
		a = n // 2 + 1
		print(a)
main()


from sys import *
t = int(stdin.readline())
while t > 0:
	n = int(stdin.readline())
	print(n // 2 + 1)
	t -= 1


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


import sys
[print(int(x) // 2 + 1) for x in sys.stdin.read().strip().splitlines()[1:]]


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	print(IN() // 2 + 1)
for _ in range(IN()):
	case()


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


import sys, math
from collections import deque, defaultdict
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

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 gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def main():
	ans = ''
	for _ in range(ii()):
		n = ii()
		if n == 1 or n == 2:
			ans += str(n) + '\n'
		else:
			ans += str(n // 2 + 1) + '\n'
	print(ans)
main()


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


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


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right
import math
ai = lambda : list(map(int, stdin.readline().split()))
ei = lambda : map(int, stdin.readline().split())
ip = lambda : int(stdin.readline().strip())
for i in range(ip()):
	n = ip()
	print(n // 2 + 1)


for i in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		print(n // 2 + 1)
	else:
		print(n // 2 + 1)
1 - 1
2 - 2
3 - 2
4 - 3
5 - 3
6 - 4
7 - 4
8 - 5
9 - 5
10 - 6
11 - 6


t = int(input())

def solve():
	a = int(input())
	print(int(a / 2) + 1)
while t:
	solve()
	t -= 1


import sys
sys.setrecursionlimit(10 ** 5)
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()):
	print(II() // 2 + 1)


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


import math
import os
import random
import re
import string
from sys import *
from collections import *

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

def solve():
	for _ in range(int(stdin.readline())):
		n = int(stdin.readline())
		if n == 1:
			print(1)
		elif n % 2 != 0:
			x = n // 2
			if x % 2 == 0:
				print(n // 2 + 1)
			else:
				print(n // 2 + 1)
		else:
			print(n // 2 + 1)
solve()


import math
t = input()
t = int(t)
for i in range(t):
	n = input()
	n = int(n)
	count = 0
	if n == 1:
		print(1)
		continue
	if n == 2:
		print(2)
		continue
	x = int(n / 2)
	print(x + 1)


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


T = int(input())
for z in range(T):
	N = int(input())
	if N % 2 == 0:
		a = N // 2
		print(a + 1)
	else:
		a = (N - 1) // 2
		print(a + 1)


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


from sys import stdin, exit
from bisect import bisect_left as bl, bisect_right as br
input = lambda : stdin.readline()[:-1]
intput = lambda : int(input())
sinput = lambda : input().split()
intsput = lambda : map(int, sinput())

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


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


import sys
RI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw = lambda : sys.stdin.readline().strip().split()
ri = lambda : int(sys.stdin.readline().strip())
rs = lambda : sys.stdin.readline().strip()
from collections import defaultdict as df
from math import *
t = ri()
for _ in range(t):
	n = ri()
	if n == 1:
		print(1)
	elif n == 2:
		print(2)
	elif n == 3:
		print(2)
	elif n == 4:
		print(3)
	elif n == 5:
		print(3)
	else:
		print((n + 2) // 2)


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


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


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import deque
from heapq import heappush, heappop, heapify
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())
ips = lambda : stdin.readline().rstrip()
t = ip()
for _ in range(t):
	n = ip()
	if n & 1 == 1:
		ans = n // 2 + 1
	else:
		ans = n // 2 + 1
	print(ans)


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


n = int(input())
nn = [0] * n
for i in range(n):
	nn[i] = int(input())
	nn[i] = nn[i] // 2 + 1
for j in nn:
	print(j)


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


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


def J1():
	t = int(input())
	ans = []
	for _ in range(t):
		n = int(input())
		ans.append(int(n / 2) + 1)
	for i in ans:
		print(i)
J1()


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


a = int(input())
for i in range(a):
	s = int(input())
	if s == 1:
		print(1)
	elif s == 2 or s == 3:
		print(2)
	else:
		print(s // 2 + 1)


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


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


n = int(input())
i = 1
while i <= n:
	n1 = int(input())
	r = n1 // 2
	r += 1
	print(r)
	i += 1


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


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n == 1:
		print(1)
	else:
		n = math.floor(n / 2)
		ans = 1 + math.ceil((n - 1) / 2) + math.ceil(n / 2)
		print(ans)


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(m,) = I()
while m:
	m -= 1
	(n,) = I()
	print(n // 2 + 1)


t = int(input())
from collections import *
from sys import *
from math import *

def f(arr, k, x):
	count = 0
	for il in arr:
		count += il // x
	if count >= k:
		return True
	else:
		return False
for ip in range(t):
	n = int(input())
	print(n // 2 + 1)


from sys import stdout, stdin
from collections import defaultdict
t = int(input())
for _ in range(t):
	n = int(input())
	print(n // 2 + 1)


a = int(input())
i = 0
while i < a:
	b = int(input())
	print(b // 2 + 1)
	i = i + 1


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 + 1) // 2)
	else:
		print(n // 2 + 1)


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


import math
case = int(input())
for caseNum in range(0, case):
	n = int(input())
	print(math.ceil((n + 1) / 2))


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


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 == 1:
		ans = 1
	elif n == 2 or n == 3:
		ans = 2
	elif n % 2 == 0:
		ans = n // 2 + 1
	else:
		ans = (n + 1) // 2
	answers.append(ans)
print(*answers, sep='\n')


import math

def solve():
	n = int(input())
	ans = n // 2 + 1
	print(ans)
t = 1
t = int(input())
while t > 0:
	t -= 1
	solve()


def tran(arr):
	return arr // 2 + 1
t = int(input())
ans = []
for i in range(t):
	arr = int(input())
	r = tran(arr)
	ans.append(r)
for i in ans:
	print(i)


t = int(input())
ans = []
for _ in range(t):
	n = int(input())
	val = (n - n % 2) // 2 + 1
	ans.append(val)
for x in ans:
	print(x)


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


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


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


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


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


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


from collections import defaultdict as dd
from collections import Counter as ctr
from sys import stdin, stdout
from math import log, sqrt
from itertools import permutations as perm
from itertools import combinations as comb
from bisect import bisect_left, insort
for t in range(int(input())):
	print((int(input()) + 2) // 2)


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


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = 1000000007

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 main():
	n = int(input())
	print(n // 2 + 1)
t = int(input())
for _ in range(t):
	main()


from math import floor
for i in range(int(input())):
	n = int(input())
	g = floor((n + 2) / 2)
	g = round(g)
	print(g)


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 + 1)
t = int(input())
ans = gift()
print(*ans, sep='\n')


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


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


import sys
T = int(input())
for line in sys.stdin:
	n = int(line)
	print(n // 2 + 1)


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


test = int(input())
i = 1
while i <= test:
	n = int(input())
	c = n // 2
	print(c + 1)
	i += 1


import time, math as mt, 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) + '\n')

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 bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * (2 * 10 ** 5 + 5)
	(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(2 * 10 ** 5 + 5):
		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 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def solve():
	n = II()
	print(n // 2 + 1)
	return
t = II()
for i in range(t):
	solve()


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


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


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


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 _ in range(n):
	m = inp()
	print(m // 2 + 1)


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for t in wtf[1:]:
	n = int(t)
	(q, r) = divmod(n, 2)
	r = 1 if r == 0 else r
	print(q + r)


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()
	c = n // 2
	print(c + 1)


from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
for _ in range(I()):
	n = I()
	print((n + 2) // 2)


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


from collections import Counter
import string
import math
import sys
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))

def printDivisors(n):
	divisors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				divisors.append(i)
			else:
				divisors.extend((i, n // i))
		i = i + 1
	return divisors

def countTotalBits(num):
	binary = bin(num)[2:]
	return len(binary)

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 comp(x):
	return x[1]
for _ in range(vary(1)):
	n = vary(1)
	print((n - 2) // 2 + 2)


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=2):
	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):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

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(ii() // 2 + 1)


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 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
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

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 % 2 == 0:
			print(n // 2 + 1)
		else:
			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')
if os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


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


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


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


import math
import collections
import bisect

def arrPrint(a):
	return ' '.join([str(i) for i in a])

def gridPrint(a):
	return '\n'.join([' '.join([str(j) for j in a[i]]) for i in range(len(a))])

def isPalindrome(s):
	for i in range(len(s) // 2):
		if not s[i] == s[-i - 1]:
			return False
	return True

def primeCheck(n):
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

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


from sys import stdin, stdout

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

def solve():
	n = int(input())
	if n == 1:
		print(n)
	else:
		count = 1
		print(count + n // 2)
for t in range(int(input())):
	solve()


ans_list = []
for i in range(int(input())):
	grid_size = int(input())
	min_turns = int(grid_size / 2 + 1)
	ans_list.append(min_turns)
for i in ans_list:
	print(i)


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


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


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


from math import *
from collections import *
from random import *
from decimal import Decimal
from heapq import *
from bisect import *
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 5)

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

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

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

def st1():
	return input().rstrip('\n')
t = inp()
while t:
	t -= 1
	n = inp()
	if n == 1:
		x = 1
	else:
		x = n // 2 + 1
	print(x)


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


from sys import stdin
input = stdin.readline

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


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


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


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


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((n + 2) // 2)


t = int(input())
l = [0, 1, 2, 2, 3]
for _ in range(t):
	n = int(input())
	if n <= 4:
		print(l[n])
	elif n % 2 == 0:
		print((n - 4) // 2 + 3)
	else:
		print((n - 3) // 2 + 2)


try:
	t = int(input())
	for v in range(t):
		n = int(input())
		m = n // 2
		m = m + 1
		print(m)
except:
	pass


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 IF(c, t, f):
	return t if c else f

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


import sys
buff_readline = sys.stdin.readline
readline = sys.stdin.readline
INF = 2 ** 60 - 1

def read_int():
	return int(buff_readline())

def read_int_n():
	return list(map(int, buff_readline().split()))

def read_float():
	return float(buff_readline())

def read_float_n():
	return list(map(float, buff_readline().split()))

def read_str():
	return readline().strip()

def read_str_n():
	return readline().strip().split()

def error_print(*args):
	print(*args, file=sys.stderr)

def mt(f):
	import time

	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

def slv(N):
	return N // 2 + 1

def main():
	T = read_int()
	for _ in range(T):
		N = read_int()
		print(slv(N))
main()


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


import math
for _ in range(int(input())):
	ans = 0
	n = int(input())
	if n == 1:
		ans = 1
	elif n == 2:
		ans = 2
	elif n == 3:
		ans = 2
	elif n == 4:
		ans = 3
	elif n == 5:
		ans = 3
	if n < 6:
		print(ans)
	elif n % 2 == 0:
		p = (n - 2 - 4) // 2 + 2
		print(p + 2)
	else:
		p = (n - 2 - 3) // 2 + 1
		print(p + 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')

class union_find:

	def __init__(self, n):
		self.n = n
		self.rank = [0] * n
		self.parent = [int(j) for j in range(n)]

	def union(self, i, j):
		i = self.find(i)
		j = self.find(j)
		if self.rank[i] == self.rank[j]:
			self.parent[i] = j
			self.rank[j] += 1
		elif self.rank[i] > self.rank[j]:
			self.parent[j] = i
		else:
			self.parent[i] = j

	def find(self, i):
		temp = i
		if self.parent[temp] != temp:
			self.parent[temp] = self.find(self.parent[temp])
		return self.parent[temp]
from math import log2, ceil
from collections import deque

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


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)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(n):
	if n % 2 == 1:
		return (n + 1) // 2
	else:
		return n // 2 + 1

def main():
	for _ in range(ri()):
		n = ri()
		wi(solve(n))
main()


import sys
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())
	if n == 1:
		print(1)
	elif n == 2 or n == 3:
		print(2)
	else:
		print((n + 2) // 2)


def solve(s):
	print(s // 2 + 1)
test = int(input())
while test != 0:
	a = int(input())
	solve(a)
	test -= 1


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


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


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


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


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


from collections import *
import sys

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

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


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


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


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


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


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())
num = inp()
for i in range(num):
	v = inp()
	print(int(v / 2) + 1)


def chess(n):
	return n // 2 + 1
n = int(input())
ans = []
for i in range(n):
	length = int(input())
	ans.append(chess(length))
for i in ans:
	print(i)


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


from math import ceil, log, floor, sqrt
import math
k = 1

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 min_subs(n, binary):
	(a, b) = (1, 1)
	mx = 0
	prev = not int(binary[0])
	res = [0] * n
	for i in range(n):
		if int(binary[i]) == 1:
			if int(binary[i]) == prev:
				a += 1
				b = a
			res[i] = a
		else:
			if int(binary[i]) == prev:
				b += 1
				a = b
			res[i] = b
		prev = int(binary[i])
		mx = max(mx, max(a, b))
	print(mx)
	print(*res, sep=' ')

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

def find_order(n):
	if n % 2 == 0:
		print(*[x for x in range(n, 0, -1)], sep=' ')
	else:
		print(-1)
t = 1
t = int(input())
cnt = 0
while t:
	t = t - 1
	cnt += 1
	(k, g) = (0, 0)
	points = []
	n = int(input())
	print(steps(n))


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


import math as mt

def tran(n):
	if n == 1:
		return 1
	elif n == 2:
		return 2
	elif n == 3:
		return 2
	elif n == 4:
		return 3
	elif n % 2 == 1:
		return mt.ceil(n / 2)
	else:
		return int(n / 2) + 1
t = int(input())
ans = []
for i in range(t):
	n = int(input())
	r = tran(n)
	ans.append(r)
for i in ans:
	print(i)


import sys

def solve(n):
	return n // 2 + 1
caseCount = int(next(sys.stdin))
for i in range(caseCount):
	x = int(next(sys.stdin))
	ans = solve(x)
	print(ans)


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


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


import sys
import math
from math import *
from collections import defaultdict
import os
from io import BytesIO, IOBase
from collections import deque
import bisect

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


import sys
from math import sqrt, gcd, ceil, log, floor
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))
sys.setrecursionlimit(200000)

def main():
	ans_ = []
	for _ in range(int(input())):
		n = int(input())
		dp = defaultdict(int)

		def f(n):
			return (n - [2, 1][n % 2]) // 2 + [2, 1][n % 2]
		ans_.append(str(f(n)))
	print('\n'.join(ans_))
main()


t = int(input())

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


from sys import stdin, stdout, setrecursionlimit
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
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()
setrecursionlimit(100000)
mod = 1000000007
tc = ii1()
for _ in range(tc):
	n = ii1()
	if n <= 2:
		print(n)
	else:
		print(n // 2 + 1)


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

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=None):
	if hi == None:
		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(100000.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 float_array():
	return list(map(float, 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())
	x = n // 2
	print(x + 1)


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


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
from itertools import accumulate
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((n + 2) // 2 if n & 1 == 0 else (n + 1) // 2)


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


def solve(n):
	if n <= 2:
		return n
	else:
		return n // 2 + 1
tc = int(input())
for _ in range(tc):
	n = int(input())
	print(solve(n))


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


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


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


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(1, itg() + 1):
	n = itg()
	print(n // 2 + 1)


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


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


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


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


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


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


squares_count = int(input())
squares = [0] * squares_count
for i in range(squares_count):
	squares[i] = int(input())
for e in squares:
	print(e // 2 + 1)


def get_answer(field_side):
	layers_count = 1 + (field_side - 1) // 2
	is_last_layer_1x1 = field_side % 2 != 0
	return layers_count + (0 if is_last_layer_1x1 else 1)

def main():
	t = int(input())
	for i in range(t):
		result = get_answer(field_side=int(input()))
		print(result)
main()


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


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


import sys, math, cmath, time
from collections import defaultdict
start_time = time.time()

def solve():
	n = inp()
	print((n + 2) // 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 counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 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))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


import sys
input = sys.stdin.readline

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


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


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	print((n + 2) // 2)


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


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	n = int(input())
	print(n // 2 + 1)


num_grids = int(input())
a = []
for num in range(num_grids):
	a.append(int(input()))
for it in range(num_grids):
	size = a[it]
	ans = size // 2 + 1
	print(ans)


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


testCases = int(input())
for case in range(testCases):
	N = int(input())
	print(N // 2 + 1)


import sys
input = sys.stdin.readline

def name(n):
	print(n // 2 + 1)

def solution():
	n = int(input())
	name(n)
t = int(input())
for i in range(0, t):
	solution()


from math import floor

def main():
	input_size = int(input())
	for i in range(input_size):
		border = int(input())
		output = floor(border / 2) + 1
		print(output)
main()


from __future__ import division, print_function
import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io
from heapq import heappop, heapify, heappush
if sys.version_info[0] < 3:
	input = raw_input
	range = xrange
	filter = itertools.ifilter
	map = itertools.imap
	zip = itertools.izip
MOD = 998244353
mod = 10 ** 9 + 7

def prepare_factorial(mod=mod):
	fact = [1]
	for i in range(1, 200005):
		fact.append(fact[-1] * i % mod)
	ifact = [0] * 200005
	ifact[200004] = pow(fact[200004], mod - 2, mod)
	for i in range(200004, 0, -1):
		ifact[i - 1] = i * ifact[i] % mod
	return (fact, ifact)

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, fact, ifact):
	t = fact[n] * (ifact[r] * ifact[n - r]) % MOD % MOD
	return t

def get_n(Sum):
	ans = (-1 + sqrt(1 + 8 * Sum)) // 2
	return ans

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):
	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

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 lrfind(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def check_sorted(a):
	for i in range(len(a) - 1):
		if a[i] > a[i + 1]:
			return False
	return True

def ceil(n, k=1):
	return n // k + (n % k != 0)

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

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

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

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

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

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

def prr(a, sep=' ', end='\n'):
	print(sep.join(map(str, a)), end=end)

def dd():
	return defaultdict(int)

def ddl():
	return defaultdict(list)

def write(s):
	return sys.stdout.write(s)

def main():
	for t in range(ii()):
		n = ii()
		print(n // 2 + 1)
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()


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


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


from collections import *
from math import *
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2 or n == 3:
		print(2)
	elif n % 2 == 0:
		print(n // 2 + 1)
	else:
		print(n // 2 + 1)


import io, os
R = lambda : map(int, input().split())
for _ in range(int(input())):
	print(int(input()) // 2 + 1)


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


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 == 1:
			print(1)
		elif N % 2 == 1:
			print(int((N + 1) // 2))
		else:
			print(int(N // 2) + 1)
main()


from sys import stdin, stdout
from math import gcd, sqrt, floor, ceil
input = stdin.readline

def list_inp(x):
	return list(map(x, input().split()))

def map_inp(x):
	return map(x, input().split())

def lcm(a, b):
	return a * b / gcd(a, b)
t = int(input())
for _ in range(t):
	n = int(input())
	print(n // 2 + 1)


def soln():
	n = int(input())
	if n == 1:
		return 1
	if n < 4:
		return 2
	if n % 2 == 0:
		return (n - 4) // 2 + 3
	return (n - 3) // 2 + 2
for i in range(int(input())):
	print(soln())


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

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

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

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

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

def main():
	t = inp()
	for _ in range(t):
		n = inp()
		res = n // 2 + 1
		print(res)
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()


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


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


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


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


(T,) = map(int, input().split())
for _ in range(T):
	(N,) = map(int, input().split())
	if N % 2:
		print(N // 2 + 1)
	else:
		print(N // 2 + 1)


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


production = True
import sys, math, collections, bisect, itertools, heapq, decimal, random, copy, re

def input(f=0, m=0):
	if m > 0:
		return [input(f) for i in range(m)]
	else:
		l = sys.stdin.readline()[:-1]
		if f >= 10:
			u = False
			f = int(str(f)[-1])
		else:
			u = True
		if f == 0:
			p = [l]
		elif f == 1:
			p = list(map(int, l.split()))
		elif f == 2:
			p = list(map(float, l.split()))
		elif f == 3:
			p = list(l)
		elif f == 4:
			p = list(map(int, list(l)))
		elif f == 5:
			p = l.split()
		return p if u else p[0]

def out(l, f=0, n=True):
	if f == 0:
		p = str(l)
	elif f == 1:
		p = ' '.join(map(str, l))
	elif f == 2:
		p = '\n'.join(map(str, l))
	elif f == 3:
		p = ''.join(map(str, l))
	print(p, end='\n' if n else '')

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

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

def solve():
	n = input(11)
	if n == 1:
		out(1)
	elif n < 4:
		out(2)
	else:
		out(n // 2 + 1)
	log()
	return
for i in range(input(11)):
	solve()


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


def solve(n):
	return (n + 2) // 2
n = int(input())
for _ in range(n):
	a = int(input())
	print(solve(a))


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


import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
ns = lambda : readline().rstrip()
ni = lambda : int(readline().rstrip())
nm = lambda : map(int, readline().split())
nl = lambda : list(map(int, readline().split()))
T = ni()
for _ in range(T):
	n = ni()
	print(n // 2 + 1)


testcases = int(input())
counter = 0
while counter < testcases:
	counter += 1
	length = int(input())
	if length % 2 == 0:
		print(int(length / 2 + 1))
	if length % 2 == 1:
		print(int(length / 2 + 0.5))


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


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


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


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


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


import math
n = int(input())
A = []
for i in range(0, n):
	print(math.floor(int(input()) / 2) + 1)


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


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


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


t = int(input())
R = lambda : map(int, input().split())
answers = []
for i in range(0, t):
	n = int(input())
	answers.append(n // 2 + 1)
for x in answers:
	print(x)


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


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


def f(x):
	return x - (x - 1) // 2
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	print(f(n))


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


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


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


a = int(input())
A = []
for i in range(a):
	b = int(input())
	A.append(b)
for n in range(len(A)):
	A[n] = A[n] // 2 + 1
	print(A[n])


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


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


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


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


import sys, io, os
sys.stdin = io.BytesIO(os.read(0, os.fstat(0).st_size))
input = lambda : sys.stdin.readline()
from collections import deque as que, defaultdict as vector, Counter
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	n = inin()
	print(n // 2 + 1)


num = int(input(''))
i = 0
while i < num:
	num2 = int(input(''))
	print(num2 // 2 + 1)
	i += 1


for k in range(int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n % 2 == 0:
		print(int(n / 2) + 1)
	else:
		print(int(n // 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, functools, itertools, operator, bisect
from collections import deque, defaultdict, OrderedDict
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(ri()):
		n = ri()
		print(n // 2 + 1)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

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()


f = int(input())
res = []
for i in range(f):
	side = int(input())
	x = side // 2 + 1
	res.append(x)
for i in res:
	print(i)


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


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


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())
t = inp()
while t > 0:
	t -= 1
	n = inp()
	print(int(n / 2) + 1)


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


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


from math import ceil

def DTB(n):
	return bin(n).replace('0b', '')
for abcd in range(int(input())):
	n = int(input())
	ans = 0
	if n == 1:
		ans = 1
	else:
		ans = n // 2 + 1
	print(ans)


from collections import defaultdict as dd
import math
import sys
import string
input = sys.stdin.readline

def nn():
	return int(input())

def li():
	return list(input())

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

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

def solve():
	n = nn()
	print((n + 2) // 2)
q = nn()
for _ in range(q):
	solve()


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


import math as mt
for x in range(int(input())):
	z = int(input())
	print(z // 2 + 1)


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().split())
inl = lambda : tuple(map(int, input().split()))
t = ini()
for i in range(t):
	n = ini()
	print(n // 2 + 1)


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


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


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()
	print(n // 2 + 1)


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


t = int(input())

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


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
import copy
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)]
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('../output.txt', 'w')
except:
	pass
for _ in range(L()[0]):
	n = L()[0]
	print(n // 2 + 1)


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


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


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


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


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)

def toord(c):
	return ord(c) - ord('a')

def lcm(a, b):
	return a * b // lcm(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

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


def chess():
	N = int(input())
	for i in range(N):
		A = int(input())
		print(A // 2 + 1)
chess()


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

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

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

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

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

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 solve():
	n = int(inp())
	if n == 1:
		print(1)
		return
	if n == 2:
		print(2)
		return
	print(n // 2 + 1)
testcase(int(inp()))


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


tom = int(input())
for q in range(tom):
	number = int(input())
	if number == 1:
		print(1)
	elif number % 2 == 0:
		print(int(number / 2) + 1)
	else:
		print(int(number // 2) + 1)


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


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


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


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


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


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


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


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


import sys
import heapq
import math
from collections import deque
from collections import defaultdict
from collections import Counter
modH = int(10 ** 9) + 7
I = lambda : list(map(int, input().split(' ')))

def PRINT(lst, sep=' '):
	print(sep.join(map(str, lst)))
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		print((n - 1) // 2 + 1)
	else:
		print(1 + n // 2)


from __future__ import division, print_function
import sys
from atexit import register
if sys.version_info[0] < 3:
	from io import BytesIO as stream
else:
	from io import StringIO as stream
sys.stdin = stream(sys.stdin.read())
input = lambda : sys.stdin.readline().rstrip('\r\n')
sys.stdout = stream()
register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))

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

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

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


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


from sys import stdin

def input():
	return stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	print(1 + n // 2)


from collections import defaultdict as dc

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


import sys, math
try:
	(sys.stdin, sys.stdout) = (open('input.txt', 'r'), open('output.txt', 'w'))
except:
	pass
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from statistics import mode
from collections import deque, defaultdict
from math import ceil, floor, inf, factorial, gcd, log2, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(float, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()

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

def setbits(n):
	return bin(n).count('1')

def resetbits(n):
	return bin(n).count('0')

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr_p(n, r, p):
	(num, den) = (1, 1)
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * modinv(den, p) % p

def isPrime(num):
	if num <= 1:
		return False
	if num == 2 or n == 3:
		return True
	if num % 2 == 0 or num % 3 == 0:
		return False
	for i in range(5, int(num ** 0.5) + 1, 6):
		if num % i == 0 or num % (i + 2) == 0:
			return False
	return True

def bin_search(arr, low, high, val):
	while low <= high:
		mid = low + (high - low) // 2
		if arr[mid] == val:
			return mid
		elif arr[mid] < val:
			low = mid + 1
		else:
			high = mid - 1
	return -1

def sumofdigit(num):
	count = 0
	while num:
		count += num % 10
		num //= 10
	return count

def make_dic(arr):
	freq = {}
	for val in arr:
		freq[val] = freq[val] + 1 if val in freq else 1
	return freq

def inputmatrix():
	(r, c) = iia()
	mat = [0] * r
	for i in range(r):
		mat[i] = iia()
	return mat

def prefix_sum(n, arr):
	for i in range(1, n):
		arr[i] += arr[i - 1]
	return arr

def binomial(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 divisors(n):
	res = []
	for i in range(1, ceil(sqrt(n)) + 1):
		if n % i == 0:
			if i == n // i:
				res.append(i)
			else:
				res.append(i)
				res.append(n // i)
	return res
for _ in range(ii1()):
	n = ii1()
	if n == 1:
		print(1)
	else:
		print(n // 2 + 1)


n_cases = int(input())
inputs = []
for _ in range(n_cases):
	inputs.append(int(input()))
for i in inputs:
	if i % 2 == 0:
		print(int((i - 2) / 2) + 2)
	else:
		print(int((i - 3) / 2) + 2)


import sys
read = lambda : sys.stdin.readline().strip()
from math import ceil
for _ in range(int(read())):
	num = int(read())
	ans = num // 2 + 1
	print(ans)


print(*[str(int(n / 2) + 1) for n in [int(input()) for x in range(int(input()))]])


import sys, math, heapq, collections, itertools, bisect
sys.setrecursionlimit(101000)

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


from __future__ import division, print_function
import os, sys
import math
import collections
from itertools import permutations
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

class my_dictionary(dict):

	def __init__(self):
		self = dict()

	def add(self, key, value):
		self[key] = value

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(my_list):
	freq = {}
	for item in my_list:
		if item in freq:
			freq[item] += 1
		else:
			freq[item] = 1
	return freq

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 sumdigit(n):
	n = str(n)
	k = 0
	for i in range(len(n)):
		k += int(n[i])
	return k

def question(a, n):
	j = a
	for i in range(n):
		if a[i] == '1':
			j[i] = '0'
		else:
			j[i] = '1'
	j[0, n - 1].reverse()
	return j

def main():
	for _ in range(ii()):
		n = ii()
		print(math.floor(n / 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')

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()


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


from math import ceil
t = int(input())
n = [int(input()) for i in range(t)]
for item in n:
	ans = (item + 1) / 2
	print(ceil(ans))


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


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


from math import *

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


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


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


t = int(input().split()[0])
for case in range(t):
	n = int(input().split()[0])
	print(1 + n // 2)


t = int(input(''))
num = []
for i in range(t):
	num.append(int(input('')))
for i in num:
	print(i // 2 + 1)


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


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


for t in range(int(input())):
	n = int(input())
	if n % 2 == 1:
		n -= 1
	print(int(0.5 * (n + 2)))


import math
from collections import Counter
from math import factorial as fact
from collections import defaultdict
import sys

def inpint():
	return int(input())

def inpstr():
	return str(input())

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

def inptup():
	return map(int, input().strip().split())
for tc in range(inpint()):
	print(inpint() // 2 + 1)


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


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


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


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()
	print(n // 2 + 1)


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


import sys
sys.setrecursionlimit(10000)
t = int(input())
for _ in range(t):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(2)
	elif n == 3:
		print(2)
	elif n == 4:
		print(3)
	else:
		print(n // 2 + 1)


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


for _ in range(0, int(input())):
	print((int(input()) + 2) // 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(inputi())
	print((n + 2) // 2)

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


import sys
from collections import defaultdict
from functools import lru_cache
from collections import Counter

def mi(s):
	return map(int, s.strip().split())

def lmi(s):
	return list(mi(s))

def mf(f, s):
	return map(f, s)

def lmf(f, s):
	return list(mf(f, s))

def main(ans):
	for n in ans:
		print(n // 2 + 1)
ans = []
for (e, line) in enumerate(sys.stdin.readlines()):
	if e == 0:
		continue
	else:
		ans.append(int(line.strip()))
main(ans)


from sys import stdout, stdin
(_input, _print) = (stdin.readline, stdout.write)
(_range, _int) = (range, int)

def solution():
	for _ in _range(_int(_input())):
		n = _int(_input())
		print(n // 2 + 1)
solution()


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 + 2) // 2)
prog()


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


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 collections import deque as que, defaultdict as vector
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	n = inin()
	print(n // 2 + 1)


numOfGrid = int(input())
sideList = []
for i in range(numOfGrid):
	sideList.append(int(input()))
for i in sideList:
	print(i // 2 + 1)


import sys
import math
input = sys.stdin.readline

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

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

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

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


import math
for _ in range(int(input())):
	n = int(input())
	if n % 2 == 0:
		ans = n // 2 + 1
	elif n % 2 != 0:
		ans = math.ceil(n / 2)
	print(ans)


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


import sys
from math import sqrt
inpt = sys.stdin.readline

def inp():
	return int(inpt())

def inlist():
	return list(map(int, inpt().split()))

def instr():
	s = inpt()
	return list(s[:len(s) - 1])

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

def prime(x):
	for i in range(2, sqrt(x) + 1):
		if x % i == 0:
			return False
	return true

def main():
	t = inp()
	for l in range(t):
		n = inp()
		print(n // 2 + 1)
main()


import sys
import math
import copy
import heapq
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter
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 = float('inf')
MOD = 10 ** 9 + 7
divide = lambda x: pow(x, MOD - 2, MOD)

def nck(n, k, kaijyo):
	return npk(n, k, kaijyo) * divide(kaijyo[k]) % MOD

def npk(n, k, kaijyo):
	if k == 0 or k == n:
		return n % MOD
	return kaijyo[n] * divide(kaijyo[n - k]) % MOD

def fact_and_inv(SIZE):
	inv = [0] * SIZE
	fac = [0] * SIZE
	finv = [0] * SIZE
	inv[1] = 1
	fac[0] = fac[1] = 1
	finv[0] = finv[1] = 1
	for i in range(2, SIZE):
		inv[i] = MOD - MOD // i * inv[MOD % i] % MOD
		fac[i] = fac[i - 1] * i % MOD
		finv[i] = finv[i - 1] * inv[i] % MOD
	return (fac, finv)

def renritsu(A, Y):
	A = np.matrix(A)
	Y = np.matrix(Y)
	Y = np.reshape(Y, (-1, 1))
	X = np.linalg.solve(A, Y)
	return X.flatten().tolist()[0]

class TwoDimGrid:

	def __init__(self, h, w, wall='#'):
		self.h = h
		self.w = w
		self.size = (h + 2) * (w + 2)
		self.wall = wall
		self.get_grid()

	def get_grid(self):
		grid = [self.wall * (self.w + 2)]
		for i in range(self.h):
			grid.append(self.wall + getS() + self.wall)
		grid.append(self.wall * (self.w + 2))
		self.grid = grid

	def init_cost(self):
		self.cost = [INF] * self.size

	def pos(self, x, y):
		return y * (self.w + 2) + x

	def getgrid(self, x, y):
		return self.grid[y][x]

	def get(self, x, y):
		return self.cost[self.pos(x, y)]

	def set(self, x, y, v):
		self.cost[self.pos(x, y)] = v
		return

	def show(self):
		for i in range(self.h + 2):
			print(self.cost[(self.w + 2) * i:(self.w + 2) * (i + 1)])

	def showsome(self, tgt):
		for t in tgt:
			print(t)
		return

	def showsomejoin(self, tgt):
		for t in tgt:
			print(''.join(t))
		return

	def search(self):
		grid = self.grid
		move = [(0, 1), (0, -1), (1, 0), (-1, 0)]
		move_eight = [(0, 1), (0, -1), (1, 0), (-1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]

def solve():
	n = getN()
	if n == 1:
		print(1)
		return
	if n % 2 == 0:
		print(n // 2 + 1)
		return
	else:
		print(n // 2 + 1)
		return

def main():
	n = getN()
	for _ in range(n):
		solve()
	return
main()


import math
import sys
from collections import Counter
from queue import Queue
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 twosum(val, W):
	C = Counter(W)
	out = 0
	for i in range(len(W)):
		if C[W[i]] > 0:
			C[W[i]] -= 1
			if C[val - W[i]] > 0:
				out += 1
				C[val - W[i]] -= 1
	return out
T = inp()
for t in range(T):
	N = inp()
	if N % 2 == 0:
		print((N + 2) // 2)
	else:
		print((N + 1) // 2)


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


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


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


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


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


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


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


n = int(input())
anss = []

def func(k):
	return k[0]
for i in range(n):
	k = int(input())
	if k == 1:
		anss.append(1)
		continue
	anss.append(k // 2 + 1)
for i in anss:
	print(i)


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 print_list(l):
	print(' '.join(map(str, l)))
for _ in range(N()):
	n = N()
	print(n + 2 >> 1)


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())
	print(ceil((n + 1) / 2))


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


from sys import stdin

def main():
	input = lambda : stdin.readline()[:-1]
	T = int(input())
	for _ in [0] * T:
		N = int(input())
		print(N // 2 + 1)
main()


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


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


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


def get_primeFactor(n):
	res = [1]
	x = 2
	while x * x <= n:
		while n % x == 0:
			res.append(x)
			n //= x
		x += 1
	if n > 1:
		res.append(n)
	return res

def getFactor(n):
	res = {1}
	x = 2
	while x * x <= n:
		if n % x == 0:
			res.add(x)
			res.add(n // x)
		x += 1
	return res
for _ in range(int(input())):
	n = int(input())
	print(n // 2 + 1)


import sys
input = sys.stdin.readline

def inter():
	return int(input())

def stringer():
	return input()

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


import math
T = int(input())
while T > 0:
	N = int(input())
	print(N // 2 + 1)
	T -= 1


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

def lis():
	return list(sep())

def N():
	return int(input())
import bisect

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

def testcase():
	for _ in range(N()):
		solve()
testcase()


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


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


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


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


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


T = int(input())
for I in range(0, T):
	N = int(input())
	print(int((N + 2) / 2))


def main():
	(n,) = map(int, input().split(' '))
	if n == 0:
		return 0
	if n == 1:
		return 1
	if n % 2 == 0:
		return n // 2 + 1
	else:
		return n // 2 + 1
for _ in range(int(input())):
	print(main())


from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right, insort
import random
import math
import heapq
from sys import stdin, stdout, setrecursionlimit
from functools import partial, cmp_to_key
from itertools import combinations, permutations
setrecursionlimit(100000)
maxN = 100000
M = 10 ** 9 + 7
dp = defaultdict(lambda : -1)
t = int(input())
for _ in range(t):
	n = int(input())
	if n & 1:
		print(int(math.ceil(n / 2)))
	else:
		print(n // 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 *
from datetime import datetime
from sys import stdin, stdout

def lcm(a, b):
	return a * b // gcd(a, b)
for _ in range(ii()):
	n = ii()
	print(n // 2 + 1)


import sys
import os.path
if os.path.exists('in.txt'):
	sys.stdin = open('in.txt', 'r')
	sys.stdout = open('out.txt', 'w')
for _ in range(int(input())):
	n = int(input())
	print(n // 2 + 1)


import math

def pfacts(n):
	ans = []
	if n % 2 == 0:
		ans.append(2)
		while n % 2 == 0:
			n //= 2
	p = 3
	while n != 1:
		if n % p == 0:
			ans.append(p)
			while n % p == 0:
				n //= p
		p += 1
	return ans
for _ in range(int(input())):
	n = int(input())
	print(1 + n // 2)


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


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


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


t = int(input())
list0 = [0] * t
for i in range(t):
	list0[i] = int(input())
	print(list0[i] // 2 + 1)


from sys import stdin, stdout
import bisect
import math
from collections import deque
mod = 10 ** 9 + 7

def st():
	return list(stdin.readline().strip())

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 DFS(dictionary, vertex, visited):
	visited[vertex] = True
	stack = [vertex]
	print(vertex)
	while stack:
		a = stack.pop()
		for i in dictionary[a]:
			if not visited[i]:
				print(i)
				visited[i] = True
				stack.append(i)

def BFS(dictionary, vertex, visited):
	visited[vertex] = True
	q = deque()
	q.append(vertex)
	while q:
		a = q.popleft()
		for i in dictionary[a]:
			if not visited[i]:
				visited[i] = True
				q.append(i)
				print(i)

def soe(limit):
	l = [1] * (limit + 1)
	l[0] = 0
	l[1] = 0
	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 gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	n = inp()
	pr(n // 2 + 1)
for _ in range(inp()):
	solve()


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


testCases = int(input())
answers = []
for i in range(0, testCases):
	num1 = int(input())
	answers.append(num1 // 2 + 1)
for i in answers:
	print(i)


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


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


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


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


from itertools import combinations
from itertools import permutations
from bisect import bisect_left
from math import ceil
from math import radians
from heapq import heapify, heappush, heappop
import bisect
from math import pi
from collections import deque
from math import factorial
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

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

def si():
	return str(input())

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

def li1():
	return list(mi())

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

def fsi():
	return str(stdin.readline())

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

def fli():
	return list(fmi())
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}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

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 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
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

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

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

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

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

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

def readTree(n):
	adj = [set() for _ in range(n)]
	for _ in range(n - 1):
		(u, v) = map(int, input().split())
		adj[u - 1].add(v - 1)
		adj[v - 1].add(u - 1)
	return adj

def treeOrderByDepth(n, adj, root=0):
	parent = [-2] + [-1] * (n - 1)
	ordered = []
	q = deque()
	q.append(root)
	depth = [0] * n
	while q:
		c = q.popleft()
		ordered.append(c)
		for a in adj[c]:
			if parent[a] == -1:
				parent[a] = c
				depth[a] = depth[c] + 1
				q.append(a)
	return (ordered, parent, depth)

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def nextPowerOf2(n):
	count = 0
	if n and (not n & n - 1):
		return n
	while n != 0:
		n >>= 1
		count += 1
	return 1 << count

def cou(n):
	c = 0
	while n > 1:
		c += 1
		n //= 2
	return c

def sortsec(l):
	return sorted(l, key=lambda x: x[1])

def BinarySearch(a, x):
	i = bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def subarray(A):
	r = set()
	p = {0}
	for x in A:
		p = {x | y for y in p} | {x}
		r |= p
	return len(r)

def findPairs(lst, K):
	return len([pair for pair in combinations(lst, 2) if sum(pair) == K])
for _ in range(ii()):
	n = ii()
	if n == 1:
		print(1)
		continue
	elif n == 2:
		print(2)
		continue
	elif n % 2 == 1:
		a = (n - 1) // 2
	else:
		a = n // 2
	print(2 + (a - 1))


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


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


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192
sys.setrecursionlimit(300000)

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')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=0, func=lambda a, b: max(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for i in range(int(input())):
	n = int(input())
	print(n // 2 + 1)


r = lambda : [*map(int, input().split())]
exec(r()[0] * 'a=r();print(int(a[0]/2)+1);')


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
mo = 1000000007
for _ in range(inn()):
	n = inn()
	print(n // 2 + 1)


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


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
for _ in range(int(input())):
	x = int(input())
	if x == 1:
		print(1)
	elif x == 2:
		print(2)
	else:
		print(x // 2 + 1)


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


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


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


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


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


import sys

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

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 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 Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	print(N // 2 + 1)


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


import random

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

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	n = int(input())
	print(n // 2 + 1)


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


t = int(input())
while t > 0:
	n = int(input())
	if n == 1:
		print(n)
	elif n == 2 or n == 3:
		print('2')
	else:
		ans = n // 2 + 1
		print(ans)
	t -= 1


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


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


def calc(n):
	if n == 1:
		return 1
	if n in [2, 3]:
		return 2
	return 3 + (n - 4) // 2
t = int(input())
for _ in range(t):
	n = int(input())
	print(calc(n))


from os import path
import sys
from heapq import heappush, heappop, heapify
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().rstrip()

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 b(i):
	return ord(i) - ord('a')
file = 1

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


from collections import deque
from math import *
import heapq
from random import *
t = int(input())
for i in range(t):
	n = int(input())
	print(n // 2 + 1)


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


numinputs = int(input())
inputlist = []
for i in range(numinputs):
	num = int(input())
	inputlist.append(num)
for item in inputlist:
	print(item // 2 + 1)


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


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


for tc in range(int(input())):
	x = int(input())
	z = x // 2 * 4
	y = x * x
	cnt = 0
	if x == 1:
		print(1)
	else:
		cnt = y // z
		if x % 2 == 0:
			print(cnt + 1)
		else:
			print(cnt)


import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

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


from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math

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()
	print(math.ceil((n + 1) / 2))

def main():
	solve()
TestCases = True
if TestCases:
	for i in range(get_int()):
		main()
else:
	main()


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


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 == 1:
		print(1)
	else:
		print(n // 2 + 1)


import sys, math as mt
import heapq as hp
import collections as cc
import bisect as bi
import math as mt
input = sys.stdin.buffer.readline
I = lambda : list(map(int, input().split()))
for tc in range(int(input())):
	(n,) = I()
	print((n + 2) // 2)


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


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


import sys
from collections import defaultdict as dd
from collections import deque
from functools import *
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 inc(d, c):
	d[c] = d[c] + 1 if c in d else 1

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

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

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

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

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

def pro(a):
	return reduce(lambda a, b: a * b, a)

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

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

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

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

def isvalid(i, j):
	return 0 <= i < n and 0 <= j < n

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')

def ck(x, y):
	return int(bin(x)[2:] + bin(y)[2:], 2)

def brute(n):
	d = [[0, 1], [0, -1], [1, 0], [-1, 0]]
	a = [[0 for i in range(n)] for j in range(n)]
	c = 0
	y = 1
	for k in range(n):
		for i in range(n):
			for j in range(n):
				if (i + j) % 2 != y:
					continue
				if i == 0 or i == n - 1 or j == 0 or (j == n - 1):
					a[i][j] = 1
				for l in d:
					g = i + l[0]
					h = j + l[1]
					if 0 <= g < n and 0 <= h < n and (a[g][h] == 1):
						a[i][j] = 1
		q = 0
		for i in range(n):
			q += a[i].count(0)
		c += 1
		y ^= 1
		if q == 0:
			break
	return c
t = fi()
while t > 0:
	t -= 1
	n = fi()
	print(n // 2 + 1)


def f():
	n = int(input(''))
	print(n // 2 + 1)
b = int(input(''))
for i in range(b):
	f()


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


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


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


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


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


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


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


t = int(input())
answers = [0] * t
for i in range(t):
	gridSize = int(input())
	answers[i] = gridSize // 2 + 1
for i in range(t):
	print(answers[i], end=' ')


from math import floor
T = int(input())
results = []
for ttt in range(T):
	n = int(input())
	results.append(floor(n / 2) + 1)
print(*results, sep='\n')


def ceildiv(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def solve():
	n = int(input())
	if n <= 2:
		print(n)
	else:
		print(ceildiv(n, 2) + (n % 2 == 0))
t = int(input())
for _ in range(t):
	solve()


import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io

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

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

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

def main():
	for i in range(ii()):
		n = ii()
		print(math.ceil(n // 2) + 1)
main()


from math import *
from math import factorial as fact, comb as ncr
from bisect import bisect_left as bl
from bisect import bisect_right as br
from array import array
from collections import Counter as ctr
from collections import deque as dq
from re import search
li = lambda : list(map(int, input().split()))
arr = lambda a: array('i', a)
bi = lambda n: bin(n).replace('0b', '')
yn = lambda f: print('NYOE S'[f::2])
sbstr = lambda a, s: search('.*'.join(a), s)

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


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


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
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')
from decimal import Decimal
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	n = int(data())
	out(n // 2 + 1)


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


from collections import defaultdict
t = int(input())
for i in range(t):
	n = int(input())
	print(2 + (n - 2) // 2)


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


t = int(input())
for j in range(t):
	a = int(input())
	if a % 2 == 0:
		num = a / 2 + 1
	elif a % 2 != 0:
		num1 = a - 1
		num = num1 / 2 + 1
	print(int(num))


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


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)
	elif n == 2:
		print(2)
	elif n == 3:
		print(2)
	else:
		print(n // 2 + 1)


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


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


mod = 10 ** 9 + 7

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


inp = lambda cast=int: [cast(x) for x in input().split()]
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)
(t,) = inp()
for _ in range(t):
	(n,) = inp()
	print((n + 2) // 2)


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


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


ls = lambda : list(map(int, input().split()))
ip = lambda : int(input())
sip = lambda : input()
r = lambda a: range(a)
lcm = lambda a, b: abs(a * b) // math.gcd(a, b)

def is_consecutive(a, n):
	if a == list(range(a[0], a[0] + n)):
		return True
	else:
		return False
t = ip()
for _ in r(t):
	n = ip()
	if n == 1:
		print(1)
	else:
		print(n // 2 + 1)


for _ in range(int(input())):
	n = int(input())
	if n <= 4:
		print(max(1, n // 2 + 1))
	else:
		print(max(1, n // 2 + 1))


import sys, os
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
input = lambda : sys.stdin.readline().strip()
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
for _ in range(I()):
	n = I()
	print(n // 2 + 1)


import sys

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(int(n / 2) + 1)


import math
grids = int(input())
grid = []
for x in range(grids):
	grid.append(int(input()))
for x in grid:
	print(math.ceil((x + 1) / 2))


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


n = int(input())
a = []
for i in range(0, n):
	a.append(input())
for item in a:
	b = int(item)
	count = int(b / 2) + 1
	print(count)


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


for _a in range(int(input())):
	g = int(input())
	print(g // 2 + 1)


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


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__

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

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


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


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


import sys
input = sys.stdin.readline

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

def solve():
	n = inp()
	return n // 2 + 1
t = inp()
while t > 0:
	print(solve())
	t -= 1


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


import math
import sys
import itertools
import random
import bisect
import heapq
import collections

def lcm(x, y):
	return x * y // math.gcd(x, y)

def hcf(x, y):
	return math.gcd(x, y)

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

def primeFactors(n):
	res = []
	while n % 2 == 0:
		res.append(2)
		n //= 2
	for i in range(3, math.sqrt(n) + 1, 2):
		while n % i == 0:
			res.append(i)
			n //= i
	if n > 2:
		res.append(n)
	return res
for _ in range(0, int(input())):
	n = int(input())
	if n == 1:
		print(1)
	elif n == 2:
		print(2)
	elif n % 2 != 0:
		print(n // 2 + 1)
	else:
		n += 1
		print(n // 2 + 1)


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


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


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


def solve(n):
	if n >= 2:
		if n % 2 == 0:
			return 2 + (n - 2) // 2
		elif n % 2 == 1:
			return 2 + (n - 3) // 2
	else:
		return 1

def solveRec(n):
	if n == 1:
		return 0
	elif n == 2:
		return 1
	else:
		return 1 + solveRec(n - 2)
tests = int(input())
for case in range(tests):
	n = int(input())
	print(solve(n))


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


a = int(input())
for i in range(a):
	b = int(input())
	if b % 2 == 0:
		result = (b - 1) * 2 // 4 + 2
	else:
		result = (b - 1) * 2 // 4 + 1
	print(result)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
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
from decimal import Decimal
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 outa(*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)]
for _ in range(int(data())):
	n = int(data())
	if n & 1:
		out((n + 1) // 2)
	else:
		out((n + 2) // 2)


from sys import stdin, stdout
input = stdin.readline

def write(n, sep='\n'):
	stdout.write(str(n))
	stdout.write(sep)

def gil():
	return list(map(int, input().split()))
from math import floor
for _t in range(int(input())):
	n = int(input())
	x = floor(n / 2 + 1)
	print(x)


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()
	if n <= 2:
		print(n)
	else:
		print((n + 2) // 2)


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

def get_int():
	return int(input())
t = get_int()
for zzz in range(t):
	n = get_int()
	ret = 1 + n // 2
	print(ret)


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


import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
from collections import deque as que, defaultdict as vector
from bisect import bisect as bsearch
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
inst = lambda : input().decode().rstrip('\n\r')
INF = float('inf')
_T_ = inin()
for _t_ in range(_T_):
	n = inin()
	print(n // 2 + 1)


import math
t = int(input())
while t:
	t -= 1
	n = int(input())
	if n == 2 or n == 3:
		print(2)
	elif n == 1:
		print(1)
	elif n % 2 == 0:
		n -= 2
		print(n // 2 + 2)
	else:
		k = math.floor(n / 2)
		print(k - 1 + 2)


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


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


import os
import heapq
import sys, threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10 ** 5)
from io import BytesIO, IOBase

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

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

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

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print(n // 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()


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


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
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())
else:

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

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

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		n = I()
		print(n // 2 + 1)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


import sys
input = sys.stdin.readline
import math

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

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

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

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

def from_file(f):
	return f.readline
t = inp()
for _ in range(t):
	n = inp()
	print(f'{n // 2 + 1}')


t = int(input())
import sys

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))
while t > 0:
	n = int(input())
	if n % 2 == 0:
		print(int(n / 2 + 1))
	else:
		print(int((n + 1) / 2))
	t -= 1


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


from sys import stdin

def r():
	return stdin.readline().strip()

def r_t(tp):
	return map(tp, r().strip().split())

def r_l(tp):
	return list(r_t(tp))

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


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


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


PI = 3.141592653589793
INF = float('inf')
MOD = 1000000007

def add(x, y):
	return (x + y) % MOD

def sub(x, y):
	return (x - y + MOD) % MOD

def mul(x, y):
	return x * y % MOD

def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)

def lcm(x, y):
	return x * y // gcd(x, y)

def power(x, y):
	res = 1
	x %= MOD
	while y != 0:
		if y & 1:
			res = mul(res, x)
		y >>= 1
		x = mul(x, x)
	return res

def mod_inv(n):
	return power(n, MOD - 2)

def prob(p, q):
	return mul(p, power(q, MOD - 2))

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

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

def ls():
	return [i for i in input().split()]
for t in range(ii()):
	t += 1
	n = ii()
	print((n + 2) // 2)


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


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