You are standing at the point $0$ on a coordinate line. Your goal is to reach the point $n$. In one minute, you can move by $2$ or by $3$ to the left or to the right (i. e., if your current coordinate is $x$, it can become $x-3$, $x-2$, $x+2$ or $x+3$). Note that the new coordinate can become negative.

Your task is to find the minimum number of minutes required to get from the point $0$ to the point $n$.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases. Then $t$ lines describing the test cases follow.

The $i$-th of these lines contains one integer $n$ ($1 \le n \le 10^9$) — the goal of the $i$-th test case.


-----Output-----

For each test case, print one integer — the minimum number of minutes required to get from the point $0$ to the point $n$ for the corresponding test case.


-----Examples-----

Input
4
1
3
4
12
Output
2
1
2
4


-----Note-----

None

Difficulty: EASY

Solutions:
for n in [*map(int, open(0))][1:]:
	print((n < 2) - -n // 3)


from sys import stdin, stdout

def ans():
	n = int(stdin.readline())
	if n % 3 == 0:
		print(n // 3)
	elif n > 3:
		print(n // 3 + 1)
	elif n == 1:
		print(2)
	else:
		print(1)
t = int(stdin.readline())
for _ in range(t):
	ans()


for no in [*map(int, open(0))][1:]:
	print((no < 2) - -no // 3)


def solve():
	n = int(input())
	if n == 1:
		return 2
	ans = n // 3
	if n % 3 == 0:
		return ans
	return ans + 1
t = int(input())
ans = []
while t:
	ans.append(str(solve()))
	t -= 1
print('\n'.join(ans))


for liuo in [*map(int, open(0))][1:]:
	print((liuo < 2) - -liuo // 3)


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


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


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


import sys
import math

def main():
	t = int(sys.stdin.readline())
	for _ in range(t):
		n = int(sys.stdin.readline())
		m = abs(n)
		if m == 1:
			print(2)
		else:
			print((m + 2) // 3)
	return
main()


for l in [*map(int, open(0))][1:]:
	print((l < 2) - -l // 3)


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	res = 0
	if n == 1:
		res = int(2)
	elif n % 3 == 0:
		res = int(n / 3)
	elif n % 3 == 1:
		res = int(2 + (n - 4) / 3)
	elif n % 3 == 2:
		res = int(1 + n / 3)
	sys.stdout.write(str(res) + '\n')


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


from sys import setrecursionlimit, stdin
setrecursionlimit(1 << 20)
readline = stdin.readline

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

def ST():
	return readline()[:-1]

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

def LII():
	return list(map(lambda x: int(x) - 1, readline().split()))

def LF(x, func):
	return [func() for _ in [0] * x]

def SPI():
	return map(int, readline().split())

def SPII():
	return map(lambda x: int(x) - 1, readline().split())

def FIE(x):
	return [readline()[:-1] for _ in [0] * x]
N = I()
for _ in range(N):
	a = I()
	if a == 1:
		print(2)
	else:
		print((a + 2) // 3)


import sys
from sys import stdin, stdout
from math import ceil, floor, sqrt, log, log2, log10
from collections import Counter
int_max = float('inf')
int_min = -float('inf')
mod = 10 ** 9 + 7
ANS = []
input = stdin.readline

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


n = int(input())
a = list()
for i in range(n):
	k = int(input())
	if k < 3:
		a.append(3 - k)
	else:
		a.append((k - 1) // 3 + 1)
for i in a:
	print(i)


t = int(input())
k = []
for i in range(t):
	a = int(input())
	if (a / 3).is_integer() == True:
		k.append(a / 3)
	elif a == 1 or a == -1:
		k.append(2)
	else:
		k.append(int(a / 3) + 1)
for i in k:
	print(int(i))


import sys
import math
from collections import Counter
from collections import defaultdict

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

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

def solve(n):
	if n == 1:
		return 2
	if n == 2 or n == 3:
		return 1
	elif n % 3 == 0:
		return n // 3
	else:
		return n // 3 + 1
t = int(input())
for _ in range(t):
	n = get_ints()
	print(solve(n[0]))


trials = int(input())
answer_list = []
for _ in range(trials):
	i = int(input())
	if i == 1:
		answer_list.append(2)
		continue
	y = i % 3
	if y == 0:
		ans = i / 3
	else:
		ans = i // 3 + 1
	ans = int(ans)
	answer_list.append(ans)
for g in answer_list:
	print(g)


def solution(arr):
	res = [2, 1, 1, 2, 2, 2]
	for it in arr:
		if it < 7:
			print(res[it - 1])
		else:
			print((it - 7) // 3 + 3)
n = int(input())
ask = []
for i in range(n):
	ask.append(int(input()))
solution(ask)


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


no = int(input())
x = []
i = 0
while i < no:
	x.append(int(input()))
	i += 1
for k in x:
	if k == 2 or k == 3:
		print(1)
	elif k == 1:
		print(2)
	elif k % 3 == 0:
		print(str(int(k / 3)))
	elif k % 3 == 1:
		print(str(int((k + 2) / 3)))
	elif k % 3 == 2:
		print(str(int((k + 1) / 3)))


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


number = int(input())
mass = []
for i in range(number):
	rez = int(input())
	mass.append(rez)
for i in range(len(mass)):
	if mass[i] % 3 == 0:
		print(mass[i] // 3)
	elif mass[i] % 3 == 1 and mass[i] != 1:
		print(mass[i] // 3 + 1)
	elif mass[i] % 3 == 1 and mass[i] == 1:
		print(2)
	else:
		print(mass[i] // 3 + 1)


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


x = int(input())
val = []
for i in range(0, x):
	val.append(int(input()))
for i in val:
	if i == 1:
		print('2')
		continue
	elif i == 2:
		print('1')
		continue
	else:
		q = int(i / 3)
		if i % 3 == 0:
			print(q)
		else:
			print(int(q + 1))


t = int(input())
a = []
for i in range(t):
	a += [abs(int(input()))]
for x in a:
	if x % 3 == 0:
		print(x // 3)
	elif x == 1:
		print(2)
	elif x % 6 in [4, 5]:
		print(x // 6 * 2 + 2)
	elif x % 6 in [1, 2]:
		print(x // 6 * 2 + 1)


t = int(input())
a = [0 for i in range(t)]
b = [0 for i in range(t)]
for i in range(t):
	a[i] = int(input())
for i in range(t):
	if a[i] == 1:
		print(2)
	elif a[i] == 2:
		print(1)
	elif a[i] == 3:
		print(1)
	elif a[i] == 4:
		print(2)
	else:
		b[i] = a[i] // 3
		m3 = a[i] % 3
		if m3 > 0:
			b[i] += 1
		print(b[i])


def sol1(i, x):
	if (i - 2) % 3 == 0:
		print(x + (i - 2) // 3)
	else:
		sol1(i - 2, x + 1)

def sol(i, x):
	if (i - 2) % 3 == 0 and i - 2 != 0:
		print(1 + x + (i - 2) // 3)
	elif (i - 2) % 3 == 0 and i - 2 == 0:
		print(1 + x)
	else:
		sol(i - 2, x + 1)
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
for i in l:
	p3 = 0
	p2 = 0
	if i == 1:
		print(2)
	elif i % 3 == 0:
		print(i // 3)
	elif i % 2 == 0:
		x = 1
		p2 = sol1(i, x)
	elif i % 2 != 0 and i % 3 != 0:
		if (i - 2) % 3 == 0:
			print(1 + (i - 2) // 3)
		elif (i - 3) % 2 == 0:
			x = 1
			sol(i - 3, x)


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


t = int(input())
l = []
for i in range(0, t):
	n = int(input())
	if n < 3:
		x = 3 - n
	elif n % 3 == 1:
		x = n // 3 + pow(n % 3 + 1, 0)
	else:
		x = n // 3 + (0 < n % 3)
	l.append(x)
for i in range(0, t):
	print(l[i])


def ans(n):
	count = 0
	n = abs(n)
	if n == 1:
		return 2
	if n % 3 == 1 or n % 3 == 2:
		return n // 3 + 1
	if n % 3 == 0:
		return n // 3
T = int(input())
r = []
for _ in range(T):
	n = int(input())
	a = ans(n)
	r.append(a)
for i in range(T):
	print(r[i])


no = int(input())
list = [int(input()) for i in range(no)]
for i in range(no):
	n = list[i]
	if n == 1:
		print(2)
	else:
		if n % 3 == 0:
			print(int(n / 3))
		if n % 3 == 1:
			print(2 + int((n - 4) / 3))
		if n % 3 == 2:
			print(1 + int((n - 2) / 3))


count = int(input())
goals = []
for i in range(count):
	goals.append(int(input()))

def eval_time(g):
	if g % 3 == 0:
		return int(g / 3)
	if g % 3 == 2:
		return g // 3 + 1
	if g == 4:
		return int(g / 2)
	if g % 3 == 1:
		if g - 4 > 0:
			return (g - 4) // 3 + 2
		else:
			return 2
for g in goals:
	print(eval_time(g))


nb = int(input())
res = []
for i in range(nb):
	goal = int(input())
	if goal == 1:
		res.append(2)
	elif goal % 3 == 0:
		res.append(goal // 3)
	elif goal % 3 == 1 or goal % 3 == 2:
		res.append(1 + goal // 3)
for i in res:
	print(i)


t = int(input(''))
testes = []
for i in range(0, t):
	n = int(input(''))
	testes.append(n)
resultados = []
for teste in testes:
	if teste == 1 or teste == 4:
		resultados.append(2)
	elif teste == 2 or teste == 3:
		resultados.append(1)
	elif teste % 3 == 0:
		resultados.append(teste / 3)
	elif teste % 3 == 1:
		teste -= 4
		resultados.append(teste / 3 + 2)
	elif teste % 3 == 2:
		resultados.append(teste / 3 + 1)
for resultado in resultados:
	print(int(resultado))


from math import ceil
import sys
input = sys.stdin.readline

def print(*args, end='\n', sep=' ') -> None:
	sys.stdout.write(sep.join(map(str, args)) + end)

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


def func():
	inputs = []
	t = int(input())
	for i in range(t):
		n = int(input())
		inputs.append(n)
	for n in inputs:
		if n == 1:
			print(2)
		elif n % 3 == 0:
			min = int(n / 3)
			print(min)
		elif n % 2 == 1:
			min = n // 3 + 1
			print(min)
		else:
			test = n
			while True:
				test = test - 2
				if test % 3 == 0:
					break
			test2 = n
			while True:
				test2 = test2 + 2
				if test2 % 3 == 0:
					break
			dif1 = abs(test - n)
			dif2 = abs(test2 - n)
			min1 = int(test / 3 + dif1 / 2)
			min2 = int(test2 / 3 + dif2 / 2)
			if min1 < min2:
				print(min1)
			else:
				print(min2)
func()


x = input().split(' ')
t = int(x[0])
q = []
for i in range(t):
	w = input().split(' ')
	q.append(int(w[0]))
for j in q:
	j = int(j)
	if j == 1:
		print(2)
	elif j % 3 == 0:
		print(int(j / 3))
	else:
		print(int(int(j / 3) + 1))


import math
t = int(input())
ans = [0] * t
f = 0
while t > 0:
	n = int(input())
	if n == 1:
		ans[f] = 2
	elif n % 3 == 1:
		ans[f] = math.floor(n / 3) + 1
	else:
		count = math.floor(n / 3)
		if n % 3 == 2:
			count += 1
		elif n % 3 == 1:
			count += 2
		ans[f] = count
	f += 1
	t -= 1
for i in ans:
	print(i)


n = int(input())
inp = []
for i in range(n):
	inp.append(int(input()))
for element in inp:
	minute = 0
	while element != 0:
		if element == 4:
			minute += 2
			element = 0
		elif element >= 3:
			minute += element // 3
			element = element % 3
			if element == 1:
				element = 4
				minute -= 1
		elif element == 2:
			minute += 1
			element = 0
		elif element == 1:
			minute += 2
			element = 0
	print(minute)


x = int(input())
result = []
for i in range(x):
	num = int(input())
	if num % 3 == 0:
		result.append(num // 3)
	elif num == 1:
		result.append(2)
	else:
		result.append(num // 3 + 1)
for i in result:
	print(i)


kactane = int(input())
t = [0] * 10000
for i in range(0, kactane):
	t[i] = int(input())
for k in range(0, kactane):
	if t[k] != 1 and t[k] % 3 == 1:
		sonuc = t[k] // 3 + 1
		print(sonuc)
	if t[k] % 3 == 0:
		sonuc = t[k] // 3
		print(sonuc)
	if t[k] % 3 == 2:
		sonuc = t[k] // 3 + 1
		print(sonuc)
	if t[k] == 1:
		print('2')


from collections import Counter
import string
import math
import bisect
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))
mod = 10 ** 9 + 7
testcases = vary(1)
for _ in range(testcases):
	n = vary(1)
	if n == 4:
		print(2)
		continue
	if n == 7:
		print(3)
		continue
	ans1 = n - n // 3 * 3
	if ans1 == 0:
		print(n // 3)
		continue
	if ans1 == 2:
		print(n // 3 + 1)
	elif n - 4 >= 0 and (n - 4) % 3 == 0:
		print(2 + (n - 4) // 3)
	else:
		print(n // 3 + 2)


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


def calculatePath(n):
	if n < 0:
		n *= -1
	numbers = {2: 0, 3: 0}
	if n == 1:
		numbers[3] = 1
		numbers[2] = 1
		return numbers[3] + numbers[2]
	remains = n % 3
	numbers[3] = int((n - remains) / 3)
	n -= 3 * numbers[3]
	if remains == 1:
		numbers[3] -= 1
		n += 3
		numbers[2] = 2
		n -= 2 * 2
	elif remains == 2:
		numbers[2] += 1
		n -= 2
	return numbers[3] + numbers[2]
testcase = int(input())
res = []
while testcase > 0:
	n = int(input())
	res.append(calculatePath(n))
	testcase -= 1
for n in res:
	print(n)


def solve(n):
	if n == 1:
		return 2
	return (n + 2) // 3
num_cases = int(input(''))
results = []
for i in range(num_cases):
	results.append(solve(int(input())))
for r in results:
	print(r)


import math
a = int(input())
b = []
while a > 0:
	i = abs(int(input()))
	b.append(math.ceil(i / 3) if i != 1 else 2)
	a -= 1
for i in b:
	print(i)


import sys
t = int(sys.stdin.readline())
while t:
	t -= 1
	n = int(sys.stdin.readline())
	x = 0
	m = 0
	while x != n:
		m += 1
		d = n - x
		if d == 1:
			x += 3
		elif d == -2:
			x -= 2
		elif d == 4 or d == 2:
			x += 2
		elif d < 6:
			x += 3
		else:
			s = d / 3
			if s == int(s):
				m += int(s) - 1
				x += 3 * int(s)
			else:
				m += int(s) - 2
				x += 3 * (int(s) - 1)
	print(m)


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


n = int(input())
A = []
for i in range(0, n):
	m = int(input())
	A.append(m)
for i in range(0, n):
	if A[i] == 1:
		print('2')
	elif A[i] % 3 == 0 or A[i] % 3 == 2 or A[i] % 3 == 1:
		if A[i] % 3 == 0:
			a = int(A[i] / 3)
			print(a)
		elif A[i] % 3 == 2:
			c = A[i] - 2
			d = int(c / 3)
			e = d + 1
			print(e)
		elif A[i] % 3 == 1:
			c = A[i] - 4
			d = int(c / 3)
			e = d + 2
			print(e)
	elif A[i] % 2 == 0:
		b = int(A[i] / 2)
		print(b)
	else:
		f = A[i] - 1
		g = int(c / 2)
		h = d + 1
		print(h)


def minPaths(n):
	return 2 if n == 1 else (2 + n) // 3
n = int(input())
l = []
for i in range(n):
	l.append(int(input()))
for i in range(n):
	print(minPaths(l[i]))


def Minute(x):
	return_list = []
	for i in x:
		if i == 1:
			return_list.append(2)
		elif i == 2:
			return_list.append(1)
		elif i % 3 == 0:
			return_list.append(i / 3)
		elif i % 3 == 2:
			return_list.append((i - 2) / 3 + 1)
		elif i % 3 == 1:
			return_list.append((i - 1) / 3 + 1)
	return return_list
testcase = input('')
n_list = []
if testcase.isnumeric() and 1 <= int(testcase) <= 10 ** 4:
	for i in range(int(testcase)):
		n_take = input('')
		if n_take.isnumeric() and 1 <= int(n_take) <= 10 ** 9:
			n_list.append(int(n_take))
		else:
			quit()
else:
	quit()
answers = Minute(n_list)
for i in answers:
	print(int(i))


a = int(input())
goals = []
i = 0
while i < a:
	b = int(input())
	goals.append(b)
	i = i + 1
initial = 0
for x in goals:
	steps = 0
	remain = x
	if remain % 3 == 0:
		steps = int(remain / 3)
	elif remain % 3 == 1 and remain != 1:
		steps = int(remain / 3) + 1
	elif remain == 1:
		steps = 2
	elif remain % 3 == 2:
		steps = int(remain / 3) + 1
	print(steps)


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


t = int(input())
A = [0] * t
for i in range(t):
	A[i] = int(input())
for i in range(t):
	if A[i] > 3:
		a = int(A[i] / 2)
		b = int(A[i] / 3)
		c = A[i] % 3
		if c != 0:
			b = b + 1
		print(min(a, b))
	elif A[i] == 3 or A[i] == 2:
		print('1')
	else:
		print('2')


re = []
numcase = int(input())
for i in range(numcase):
	goal = int(input())
	if goal < 0:
		goal = -goal
	if goal == 1 or goal == -1:
		re.append(2)
	elif goal % 3 == 0:
		re.append(goal // 3)
	elif goal % 3 == 1:
		re.append((goal - 4) // 3 + 2)
	elif goal % 3 == 2:
		re.append((goal - 2) // 3 + 1)
for term in re:
	print(term)


import math
t = int(input())
answer_list = []
for i in range(t):
	a = math.fabs(int(input()))
	b = a // 3
	c = a - b * 3
	if a == 1:
		d = 2
	elif a == 2:
		d = 1
	elif a >= 3 and c != 0:
		d = b + 1
	else:
		d = b
	answer_list.append(int(d))
print(*answer_list, sep='\n')


for _ in range(int(input())):
	N = int(input())
	if N == 1:
		print(2)
		continue
	q = N // 3
	print(q + 1 if N % 3 else q)


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


a = int(input())
f = []
for i in range(1, a + 1):
	b = int(input())
	if b == 1:
		f.append(2)
	elif b % 3 == 0:
		f.append(b // 3)
	elif b % 3 > 0:
		f.append(b // 3 + 1)
for t in f:
	print(t)


for _ in range(int(input())):
	n = int(input())
	ans = n // 3
	if n % 3 == 1 and n > 1:
		ans += 1
	elif n % 3 == 1 and n == 1:
		ans += 2
	elif n % 3 == 2:
		ans += 1
	print(ans)


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


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


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


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

def inp_s(k):
	arr = []
	for i in range(k):
		arr.append(input())
	return arr

def help():
	pass
for _ in range(int(input())):
	n = int(input())
	if n == 1:
		print(2)
	elif n % 3 == 0:
		print(n // 3)
	elif n % 3 == 1:
		print(min(n // 3 + 1, n // 2))
	elif n % 3 == 2:
		print(n // 3 + 1)


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


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


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


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


n = int(input())

def solve(x):
	if x % 3 == 0:
		return x // 3
	t = x // 3
	for f in range(t, -1, -1):
		if (x - f * 3) % 2 == 0:
			return f + (x - f * 3) // 2
	return t + 2
for _ in range(n):
	x = int(input())
	print(solve(x))


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


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