Little Artem got n stones on his birthday and now wants to give some of them to Masha. He knows that Masha cares more about the fact of receiving the present, rather than the value of that present, so he wants to give her stones as many times as possible. However, Masha remembers the last present she received, so Artem can't give her the same number of stones twice in a row. For example, he can give her 3 stones, then 1 stone, then again 3 stones, but he can't give her 3 stones and then again 3 stones right after that.

How many times can Artem give presents to Masha?


-----Input-----

The only line of the input contains a single integer n (1 ≤ n ≤ 10^9) — number of stones Artem received on his birthday.


-----Output-----

Print the maximum possible number of times Artem can give presents to Masha.


-----Examples-----
Input
1

Output
1

Input
2

Output
1

Input
3

Output
2

Input
4

Output
3



-----Note-----

In the first sample, Artem can only give 1 stone to Masha.

In the second sample, Atrem can give Masha 1 or 2 stones, though he can't give her 1 stone two times.

In the third sample, Atrem can first give Masha 2 stones, a then 1 more stone.

In the fourth sample, Atrem can first give Masha 1 stone, then 2 stones, and finally 1 stone again.

Difficulty: EASY

Solutions:
a = int(input())
print(a // 3 * 2 + (a % 3 + 2) // 3)


t = int(input())
if t >= 3:
	print(round(t / 3 * 2))
else:
	print(1)


def solve():
	N = int(input())
	d3 = N // 3
	m3 = N % 3
	ans = d3 * 2
	if m3 == 1:
		ans += 1
	elif m3 == 2:
		ans += 1
	print(ans)

def __starting_point():
	solve()
__starting_point()


N = int(input())
if N == 1 or N == 2:
	print(1)
elif N % 3 == 0:
	print(int(N / 3) * 2)
elif N % 3 != 3 and (N != 1 or N != 2):
	print(int(N / 3) * 2 + 1)


n = int(input())
sol = n // 3 * 2
if n % 3:
	sol += 1
print(sol)


n = int(input())
x = 2 * (n // 3)
if n % 3 != 0:
	x += 1
print(x)


n = int(input())
ans = 2 * (n // 3)
if n % 3 > 0:
	ans += 1
print(ans)


n = int(input())
if n == 1:
	print(1)
elif n == 2:
	print(1)
else:
	tot = n // 3
	rem = n % 3
	ans = tot * 2
	if rem:
		ans += 1
	print(ans)


n = int(input())
if n % 3 == 0:
	t = 2 * int(n / 3)
else:
	t = 2 * int(n / 3) + 1
print(t)


def main():
	n = int(input())
	arr = [int(i) for i in input().split(' ')]
	arr_sum = sum(arr)
	zeros = len([i for i in arr if i == 0])
	if -1 * arr_sum == zeros:
		print(zeros + 1)
		return
	print(max(0, zeros))

def possible(arr):
	halfsum = sum(arr) // 2
	if halfsum in arr:
		return True
	for i in range(0, 4):
		for j in range(i + 1, 4):
			if arr[i] + arr[j] == halfsum:
				return True
	return False

def is_palin(string):
	if not string or len(string) == 1:
		return True
	n = len(string)
	for i in range(0, n // 2):
		pass
n = int(input())
print(n // 3 * 2 + (n % 3 != 0))


n = int(input())
if n <= 2:
	print(1)
else:
	r = n // 3
	rem = n % 3
	if rem == 0:
		print(r * 2)
	else:
		print(1 + r * 2)


print((lambda x: x // 3 * 2 + (x % 3 + 2) // 3)(int(input())))


import collections, itertools, fractions, functools, heapq, math, queue

def solve():
	n = int(input())
	r = n // 3 * 2
	if n % 3 != 0:
		r += 1
	return r
print(solve())


print((int(input()) * 2 + 1) // 3)


n = int(input())
print([2 * (n // 3) + 1, 2 * (n // 3)][n % 3 == 0])


n = int(input())
mod = n % 3
if mod == 0:
	print(int(n / 3) * 2)
elif mod == 1:
	print(int((n - 1) / 3 * 2 + 1))
elif mod == 2:
	print(int((n - 2) / 3 * 2 + 1))


n = int(input())
c = 2 * (n // 3)
if n % 3:
	c += 1
print(c)


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


n = int(input())
if n == 1 or n == 2:
	print(1)
else:
	if n % 3 == 0:
		print(2 * (n // 3))
	if n % 3 == 1 or n % 3 == 2:
		print(2 * (n // 3) + 1)


n = int(input())
ans = 2 * (n // 3)
if n <= 2:
	ans = 1
elif n % 3 == 0:
	ans = 2 * (n // 3)
else:
	ans = 2 * (n // 3) + 1
print(ans)


import sys

def f(n):
	(d, m) = divmod(n, 3)
	return d * 2 + (1 if m > 0 else 0)
print(f(int(sys.stdin.read())))


n = int(input())
flag = 0
if n == 1 or n == 2:
	print(1)
	flag = 1
if n % 3 == 0:
	print(n // 3 * 2)
	flag = 1
elif flag == 0:
	n = n - 1
	if n % 3 == 0:
		print(n // 3 * 2 + 1)
		flag = 1
	else:
		n = n - 1
		if n % 3 == 0:
			print(n // 3 * 2 + 1)


n = int(input())
answer = n // 3 * 2
n -= answer / 2 * 3
while True:
	if n < 1:
		break
	else:
		answer += 1
		n -= 1
	if n < 2:
		break
	else:
		answer += 1
		n -= 2
print(answer)


def solve(n):
	if n % 3 == 0:
		return n // 3 * 2
	else:
		return n // 3 * 2 + 1
n = int(input())
print(solve(n))


n = int(input())
rem = n % 3
if rem:
	print(n // 3 * 2 + 1)
else:
	print(n // 3 * 2)


parse_int = lambda : list(map(int, input().split()))
n = int(input())
res = n // 3 * 2
if n % 3 > 0:
	res += 1
print(res)


def ras(n):
	if n % 3 == 0:
		x = n / 3 * 2
		return int(x)
	else:
		x = (n - n % 3) / 3 * 2 + 1
		return int(x)
n = int(input())
r = ras(n)
print(r)


x = int(input())
print(x // 3 * 2 + int(x % 3 != 0))


n = int(input())
res = int(n / 3)
res *= 2
if n % 3 > 0:
	res += 1
print(res)


n = int(input())
number = n // 3 * 2
if n % 3 > 0:
	number += 1
print(number)


import math
n = int(input())
a = math.floor(n / 3) + 1
if n % 3 == 0:
	result = n / 3 * 2
if n % 3 == 2 or n % 3 == 1:
	result = a * 2 - 1
print(int(result))


import unittest
import sys

class Presents:

	def __init__(self, test_inputs=None):
		it = iter(test_inputs.split('\n')) if test_inputs else None

		def uinput():
			return next(it) if it else sys.stdin.readline().rstrip()
		[self.n] = map(int, uinput().split())

	def calculate(self):
		result = self.n // 3 * 2
		if self.n % 3 != 0:
			result += 1
		return str(result)

class unitTests(unittest.TestCase):

	def test_single_test(self):
		test = '1'
		d = Presents(test)
		self.assertEqual(d.n, 1)
		self.assertEqual(Presents(test).calculate(), '1')
		test = '2'
		self.assertEqual(Presents(test).calculate(), '1')
		test = '3'
		self.assertEqual(Presents(test).calculate(), '2')
		test = '5'
		self.assertEqual(Presents(test).calculate(), '3')

	def time_limit_test(self, nmax):
		import random
		import timeit
		test = str(nmax) + ' ' + str(nmax) + '\n'
		numnums = [str(i) + ' ' + str(i + 1) for i in range(nmax)]
		test += '\n'.join(numnums) + '\n'
		nums = [random.randint(1, 10000) for i in range(nmax)]
		test += ' '.join(map(str, nums)) + '\n'
		start = timeit.default_timer()
		d = Presents(test)
		calc = timeit.default_timer()
		d.calculate()
		stop = timeit.default_timer()
		print('\nTimelimit Test: ' + '{0:.3f}s (init {1:.3f}s calc {2:.3f}s)'.format(stop - start, calc - start, stop - calc))
sys.setrecursionlimit(100000)
if sys.argv[-1] == '-ut':
	unittest.main(argv=[' '])
sys.stdout.write(Presents().calculate())


a = int(input())
b = 0
c = 0
if a % 3 == 0:
	print(a // 3 * 2)
else:
	print(a // 3 * 2 + 1)


def solution(n):
	if n == 2:
		return 1
	return int(n / 3) * 2 + (n % 3 != 0)

def answer():
	n = int(input())
	print(solution(n))
answer()


n = int(input())
times = n // 3 * 2
if n == 2:
	times = 1
elif n % 3 != 0:
	times += 1
print(times)


a = int(input())
print(2 * (a // 3) if not a % 3 else 2 * (a // 3) + 1)


n = int(input())
a = 2 * (n // 3)
b = n % 3
if b > 0:
	a += 1
print(a)


stones = int(input())
extra = 1 if stones % 3 != 0 else 0
print(2 * (stones // 3) + extra)


t = int(input())
d = t // 3
if t % 3 == 0 or t % 3 == 1:
	print(t - d)
else:
	print(t - d - 1)


n = int(input())
n3 = n // 3
r3 = n % 3
if r3:
	print(2 * n3 + 1)
else:
	print(2 * n3)


num = int(input())
y = num // 3 * 2
if num % 3 == 0:
	print(y)
else:
	print(y + 1)


a = int(input())
print(a // 3 * 2 + [0, 1][a % 3 != 0])


n = int(input())
print(1 + (n - 1) // 3 + n // 3)


h = int(input())
print(h // 3 * 2 + (h % 3 != 0))


n = int(input())
print(round(n / 3 * 2))


n = int(input())
if n % 3 != 0:
	a = n // 3 * 2 + 1
	print(a)
else:
	c = n // 3 * 2
	print(c)


x = int(input())
core = x // 3 * 2
l = x - x // 3 * 3
if l == 0:
	print(core)
else:
	print(core + 1)


def __starting_point():
	n = int(input())
	if n % 3 == 0:
		print(2 * (n // 3))
	else:
		print(2 * (n // 3) + 1)
__starting_point()


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

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

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

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

def S():
	return input()

def main():
	n = I()
	x = n // 3
	ans = x * 2
	n -= x * 3
	if n >= 1:
		ans += 1
	return ans
print(main())


t = int(input())
g = 0
g = t // 3
g = g * 2
if t % 3 > 0:
	g += 1
print(g)


n = int(input())
triples = n // 3
print(2 * triples if 3 * triples == n else 2 * triples + 1)


n = int(input())
a = n // 3
print(2 * a + int(n - 3 * a > 0))


stones = int(input())
if stones % 3 == 0:
	print(stones // 3 * 2)
if stones % 3 == 1:
	print(stones // 3 * 2 + 1)
if stones % 3 == 2:
	print(stones // 3 * 2 + 1)


N = int(input())
print(N // 3 * 2 + bool(N % 3))


n = int(input())
a = n % 3
if a == 1 or a == 2:
	print(n // 3 * 2 + 1)
else:
	print(n // 3 * 2)


p = int(input())
if p >= 3:
	result = p // 3
	x = result * 2
	y = p - result * 3
	if y != 0:
		x += 1
else:
	x = 1
print(x)


n = int(input())
if n % 3 == 1:
	print(n - n // 3)
elif n % 3 == 2:
	print(n - 1 - (n - 1) // 3)
else:
	print(n - n // 3)


a = int(input())
b = int(not not a % 3)
c = int(a / 3) * 2
print(b + c)


x = int(input())
print(2 * int(x / 3) if x / 3 == int(x / 3) else 2 * int(x / 3) + 1)


n = int(input())
if n % 3 == 0:
	answer = 2 * n / 3
else:
	answer = 2 * (n - n % 3) / 3 + 1
print(int(answer))


n = int(input())
gifts = 2 * (n // 3) + int(n % 3 != 0)
print(gifts)


import math
from fractions import Fraction as frac
MOD = 1000000000.0 + 7

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

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

def solve(case_no):
	n = int(input())
	ans = n // 3 * 2
	n -= n // 3 * 3
	if n >= 1:
		ans += 1
	print(ans)
t = 1
for i in range(1, t + 1):
	solve(i)


q = int(input(''))
a = q // 3 * 2
if q % 3 != 0:
	a += 1
print(a)


x = int(input())
y = x // 3 * 2
if x % 3 != 0:
	y += 1
if x == 0:
	print('0')
else:
	print(y)


n = int(input())
d = n % 3
p = n // 3
left = n - p * 3
p *= 2
if left == 2:
	p += 1
elif left == 1:
	p += 1
print(p)


a = int(input())
sum = a // 3 * 2
if a % 3 == 1 or a % 3 == 2:
	sum += 1
print(sum)


n = int(input())
k = n // 3 * 2
if n % 3 > 0:
	k += 1
print(k)


n = int(input())
m = n % 3
z = n // 3
if m == 0:
	print(z * 2)
else:
	print(z * 2 + 1)


n = input()
n = int(n)
i = n // 3 * 2
if n % 3 != 0:
	i += 1
print(i)


n = int(input())
s = n // 3 * 2
if n % 3 != 0:
	s += 1
print(s)


a = int(input())
k = s = t = int(0)
if a % 3 == 0:
	k = a // 3 * 2
else:
	k = a // 3 * 2 + 1
print(k)


n = int(input())
if n == 1 or n == 2:
	print(1)
else:
	num = n // 3
	if n % 3:
		print(2 * num + 1)
	else:
		print(2 * num)


n = int(input())
if n <= 2:
	print(1)
else:
	k = n // 3
	p = n % 3
	if p == 0:
		print(k * 2)
	else:
		print(1 + k * 2)


num = int(input())
numleft = num % 3
out = 2 * (num // 3)
if numleft == 0:
	print(out)
else:
	print(out + 1)


x = int(input())
y = x % 3
z = x // 3
if y:
	print(z * 2 + 1)
else:
	print(z * 2)


import math
s = int(input())
if s == 1 or s == 2:
	print(1)
elif s % 3 == 0:
	print(2 * (s // 3))
else:
	print(1 + 2 * (s // 3))


n = int(input())
ans = 2 * (n // 3) + (n % 3 != 0)
print(ans)


import math
stones = int(input())
extra = 0
if stones % 3 == 2 or stones % 3 == 1:
	extra = 1
if stones >= 3:
	print(math.floor(stones / 3) * 2 + extra)
else:
	print('1')


n = int(input())
kam = n // 3
s = kam * 2
tam = n % 3
if tam == 0:
	print(s)
else:
	print(s + 1)


from math import ceil
n = int(input())
ans = n // 3 * 2
if n % 3 != 0:
	ans += 1
print(ans)


n = int(input())
if n == 1 or n == 2:
	print(1)
elif n == 4 or n == 5:
	print(3)
elif n % 3 == 0:
	print(n // 3 * 2)
else:
	print(n // 3 * 2 + 1)


n = int(input())
print(n // 3 * 2 + min(1, n % 3))


n = int(input())
a = n % 3
if a == 2:
	a = 1
print(a + n // 3 * 2)


import math as m
n = int(input())
if n < 3:
	print(1)
elif n % 3 == 0:
	print(m.floor(n / 3) * 2)
else:
	print(m.floor(n / 3) * 2 + 1)


from math import ceil
a = int(input())
if a == 1:
	print(a)
else:
	print((a * 2 + 1) // 3)


a = int(input())
print(a // 3 * 2 + (1 if a % 3 > 0 else 0))


n = int(input())
output = n // 3 * 2
print(output + 1 if n % 3 > 0 else output)


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

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

def pt(x):
	print(x)

def ip():
	return input()

def it():
	return int(input())

def sl(x):
	return [t for t in x]

def spl(x):
	return x.split()

def aj(liste, item):
	liste.append(item)

def bin(x):
	return '{0:b}'.format(x)

def listring(l):
	return ' '.join([str(x) for x in l])

def printlist(l):
	print(' '.join([str(x) for x in l]))
n = it()
if n % 3 == 0:
	print(2 * (n // 3))
elif n % 3:
	print(2 * (n // 3) + 1)


n = int(input())
result = int((n * 2 + 1) // 3)
print(result)


n = int(input())
count = 0
count += n // 3 * 2
n = n % 3
if n % 3 != 0:
	count += 1
print(count)


n = int(input())
(d, r) = divmod(n, 3)
print(d * 2 + (1 if r > 0 else 0))


m1 = 'abcdefghijklmnopqrstuvwxyz'
m2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
cond = ['No', 'Yes']
Cond = ['NO', 'YES']
n = int(input())
ans = int(n / 3)
ans *= 2
ans += 1 if n % 3 > 0 else 0
print(ans)


n = int(input())
n1 = 2 * n // 3
n2 = (2 * n + 1) // 3
print(max(n1, n2))


x = int(input())
if x % 3 == 0:
	r = 0
else:
	r = 1
x = x // 3 * 2
print(x + r)


a = int(input())
b = int((a * 2 + 1) / 3)
print(b)


def reversed_list(l, start, end):
	if start >= end:
		return l
	(l[start], l[end]) = (l[end], l[start])
	return reversed_list(l, start + 1, end - 1)

def main_function():
	n = int(input())
	if n < 3:
		return 1
	elif not n % 3:
		return 2 * (n // 3)
	return 2 * (n // 3) + 1
print(main_function())


n = int(input())
y = n // 3 * 2
if n % 3 == 0:
	print(y)
else:
	print(y + 1)


def main():
	d = int(input())
	c = d // 3 * 2
	v = d % 3
	if v != 0:
		c += 1
	print(c)
main()


n = int(input())
S = n // 3
if n % 3 == 0:
	print(S * 2 + n % 3)
else:
	print(S * 2 + 1)


IL = lambda : list(map(int, input().split()))
n = int(input())
print(n // 3 * 2 + (n % 3 > 0))


n = int(input())
t = n // 3 * 2
p = n % 3
if p > 0:
	t += 1
print(t)


n = int(input())
if n % 2 == 0:
	a = n
	if a % 3 == 0:
		print(a // 3 * 2)
	else:
		print(a // 3 * 2 + 1)
else:
	n = n - 1
	a = n
	if a % 3 == 0:
		print(2 * (a // 3) + 1)
	elif a % 3 == 1:
		print(2 * (a // 3) + 1)
	elif a % 3 == 2:
		print(2 * (a // 3) + 2)


n = int(input())
g = 3 * (n // 3)
if n - g >= 1:
	print(2 * (n // 3) + 1)
else:
	print(2 * (n // 3))


from math import ceil
n = int(input())
ans = 2 * (n // 3) + ceil(n % 3 / 2)
print(ans)


n = int(input(''))
a = n % 3
b = int(n / 3)
if a >= 1:
	m = 1
else:
	m = 0
sol = b * 2 + m
print(str(sol))


import sys
import math
import bisect

def main():
	n = int(input())
	cnt = n // 3 * 2
	if n % 3:
		cnt += 1
	print(cnt)
main()


from math import *
Stones = int(input())
print(Stones - floor((Stones + 1) / 3))


n = int(input())
d = n % 3 != 0
print(2 * (n // 3) + d)


rocks_nr = int(input())
ans = rocks_nr // 3 * 2
ans += 1 if rocks_nr % 3 != 0 else 0
print(ans)


from math import *
n = int(input())
if n % 3 != 0:
	print(n // 3 * 2 + 1)
else:
	print(n // 3 * 2)


n = int(input())
x = (2 * n + 1) // 3
print(x)


import sys
data = sys.stdin.readline()
index = int(data)
if index % 3 == 0:
	print(index * 2 // 3)
else:
	multipleOfThree = index // 3
	print(2 * multipleOfThree + 1)


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


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
ABCD = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
months = {1: 31, 2: 28, 3: 31, 4: 30, 5: 31, 6: 30, 7: 31, 8: 31, 9: 30, 10: 31, 11: 30, 12: 31}
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

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')
n = int(input())
print(2 * (n // 3) + math.ceil(n % 3 / 3))


n = int(input())
print(max(n // 3 * 2 + (n % 3 >= 1), 1))


n = int(input())
if n == 0:
	print(0)
elif n == 1:
	print(1)
elif n == 2:
	print(1)
elif n % 3 == 0:
	k = n // 3
	print(2 * k)
else:
	k = n // 3
	print(2 * k + 1)


n = int(input())
r = n % 3
t = n // 3
if r == 1:
	print(2 * t + 1)
elif n < 3:
	print('1')
elif r == 2:
	print(2 * t + 1)
elif r == 0:
	print(2 * t)


def calc(val):
	count = val // 3 * 2
	if val % 3 > 0:
		count = count + 1
	print(count)

def main():
	arg = int(input())
	calc(arg)
main()


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

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

def do():
	n = inp()
	return n // 3 * 2 + (n % 3 != 0)
print(do())


import math
n = int(input())
print('1' if n <= 2 else int(n // 3 * 2 + math.ceil(float(n % 3) / 2)))


n = int(input())
n3 = n // 3
np = n3 * 2
if n % 3 != 0:
	np += 1
print(np)


import math
n = int(input())
lastReceived = 0
ans = 0
p = 0
if n % 3 == 1 or n % 3 == 2:
	p = 1
print(math.floor(n / 3) * 2 + p)


n = int(input())
r = n % 3
s = 0
if not r:
	print(2 * (n // 3))
else:
	print(1 + 2 * (n // 3))


n = int(input())
r = n % 3
if not r:
	print(2 * (n // 3))
else:
	print(1 + 2 * (n // 3))


p = int(input())
x = 0
x = p // 3 * 2
p = p % 3
while p:
	p = p - 1
	x = x + 1
	if p <= 1:
		break
	p = p - 2
	x = x + 1
print(x)


n = int(input())
res = 2 * (n // 3) + (n % 3 > 0)
print(res)


def first():
	inp = int(input())
	res = int(inp / 3 * 2)
	if inp % 3 == 1:
		res += 1
	print(res)
first()


import math
n = int(input())
if n % 3 == 0:
	print(2 * (n // 3))
else:
	print(n // 3 + math.ceil(n / 3))


a = int(input())
ans = a // 3 * 2
if a % 3 != 0:
	ans += 1
print(ans)


class CodeforcesTask669ASolution:

	def __init__(self):
		self.result = ''
		self.n = 0

	def read_input(self):
		self.n = int(input())

	def process_task(self):
		res = 2 * (self.n // 3) + self.n % 3
		if self.n % 3 == 2:
			res -= 1
		self.result = str(res)

	def get_result(self):
		return self.result
Solution = CodeforcesTask669ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


def present(number):
	flag = 0
	if number % 3 == 0:
		flag = 0
	else:
		flag = 1
	return 2 * (number // 3) + flag
print(present(int(input())))


n = int(input())
p = n // 3 * 2
if n % 3:
	p = p + 1
print(p)


from math import ceil
n = int(input())
if n % 3 == 0:
	print(n - int(n / 3))
else:
	print(int(n / 3) + ceil(n / 3))


n = int(input())
r = 2 * (n // 3)
if n % 3 != 0:
	r += 1
print(r)


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	n = read_int()
	(q, r) = divmod(n, 3)
	total = 2 * q
	if r:
		total += 1
	print(total)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
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 read_int():
	return int(input())

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

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

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

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

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

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


n = int(input())
ans = int(n // 3 * 2)
print(ans + 1 if n % 3 else ans)


def solve(n):
	x = n // 3
	c = 2 * x
	n -= 3 * x
	if n:
		c += 1
	return c
n = int(input())
print(solve(n))


total = int(input())
if total == 0:
	print(0)
if total % 3 == 0:
	print(int(total / 3) * 2)
else:
	print(int(total / 3) * 2 + 1)


inp = int(input())
if inp % 3 == 0:
	print(inp // 3 * 2)
else:
	print(inp // 3 * 2 + 1)


n = int(input())
r = n / 1.5
if r - int(r) > 0.5:
	r = int(r) + 1
else:
	r = int(r)
print(r)


def max_presents(n):
	if n % 3 == 0:
		return n // 3 * 2
	else:
		return n // 3 * 2 + 1

def main():
	n = int(input().strip())
	ans = max_presents(n)
	print(ans)
main()


def main():
	n = int(input())
	print(solver(n))

def solver(n):
	if n % 3 == 0:
		return n // 3 * 2
	elif n % 3 == 1:
		return (2 * n + 1) // 3
	else:
		return (2 * (n - 1) + 1) // 3
main()


import sys
import math
import itertools as it
import operator as op
import fractions as fr
n = int(sys.stdin.readline().strip())
r = n // 3 * 2
if n % 3:
	r += 1
print(r)


a = int(input())
toAdd = 0
if a % 3 != 0:
	toAdd = 1
print(a // 3 * 2 + toAdd)


def solve():
	n = int(input())
	if n == 1 or n == 2:
		print(1)
	else:
		kk = n // 3
		ans = 2 * kk
		if n % 3 == 0:
			print(ans)
		else:
			print(ans + 1)
solve()


n = int(input())
q = int(n / 3)
k = n % 3
if k == 0:
	print(str(q * 2))
elif k == 1:
	print(str(q * 2 + 1))
elif k == 2:
	print(str(q * 2 + 1))


n = int(input())
result = 2 * (n // 3)
if n % 3 != 0:
	result += 1
print(result)


import math
n = int(input())
c = math.floor(n // 3)
print(c * 2 + 1) if n % 3 != 0 else print(c * 2)


inputValue = input()
aq = int(int(inputValue) / 3)
aq = int(2 * aq)
bq = int(inputValue) % 3
if bq != 0:
	aq = aq + 1
print(aq)


n = int(input())
print(n // 3 * 2 + (n % 3 == 1 or n % 3 == 2))


x = int(input())
j = x // 3
if x % 3 != 0:
	p = 1
else:
	p = 0
print(2 * j + p)


n = int(input())
if n == 1 or n == 2:
	print(1)
elif n % 3 == 0:
	print(int(n / 3) * 2)
elif n % 3 == 1 or n % 3 == 2:
	print(int(n // 3) * 2 + 1)


n = int(input())
print(n // 3 * 2 + bool(n % 3))


def regalos(num):
	if num >= 0 or num <= 100:
		if num % 3 == 0:
			return num / 3 * 2
		else:
			return round(num / 3 * 2)
	else:
		return 'error'
num = int(input())
print('%.0f' % regalos(num))