def count():
    n = int(raw_input())
    num = 1
    result = 0
    height = 0
    total = []

    if n == 1:
        return 1

    while sum(total) < n:
        result += num
        num += 1
        total.append(result)
        if sum(total) <= n:
            height += 1

    return height

print count()

n=int(input())
if n==1:
    print("1")
else:
    sum_=0
    count=0
    add_=-1
    for i in range(1000):
        sum_=sum_+i
        count=count+sum_
        if count<=n:
            add_=add_+1
        else:
            break
    print(add_)

n = int(input())
k = 1
s = 0
while 1:
    if s + k*(k+1)//2 > n:
        print(k-1)
        break
    elif s + k*(k+1)//2 == n:
        print(k)
        break
    else:
        s += k*(k+1)//2
        k+=1

import math

__author__ = "runekri3"

cubes = int(input())
height = 1
cur_cubes = 1
while cubes >= cur_cubes:
    height += 1
    cur_cubes += height * (height + 1) // 2
height -= 1
print(height)

n = int(input())
lvl = 0
row = 1
plus = 2
while n >= 0:
    n -= row
    lvl += 1
    row += plus
    plus += 1
print(lvl-1)

n=int(input())
m=0#колличество кубиков в одном уровне
i=0#номер уровня
while n>=m:
    m=m+i+1
    if n>=m:
        n=n-m
        i+=1
print(i)

from math import *
from collections import deque
from copy import deepcopy
import sys
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def multi(): return map(int,input().split())
def strmulti(): return map(str, inp().split())
def lis(): return list(map(int, inp().split()))
def lcm(a,b): return (a*b)//gcd(a,b)
def ncr(n,r): return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))
def stringlis(): return list(map(str, inp().split()))
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def printlist(a) :
    print(' '.join(str(a[i]) for i in range(len(a))))

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

#copied functions end

#start coding

n=int(input())
i=1
num=0
if(n==1):
    print(1)
    exit(0)
while(num<n):
    # print(num)
    num+=i*(i+1)//2
    if(num+(i+1)*(i+2)//2>n):

        # print("chala")
        break
    # if(num>n):
    #     i-=1
    #     break
    i+=1
print(i)

i=int(input())
t=0
sumi=0
l=0
while(i>=0):
 l=l+1
 t=t+l
 i=i-t
print(l-1)

j = int(input())

def pyramid_height(cubes):
    additional_cubes = 1
    curr_layer_cubes = 0
    height = 0

    while True:
        curr_layer_cubes += additional_cubes
        cubes -= curr_layer_cubes
        if cubes < 0:
            return height
        height += 1
        additional_cubes += 1

print(pyramid_height(j))

j = int(input())
def pyramids():
    if j == 1:
        print(1)
        return

    k = 0
    l = []

    for i in range(1, j + 1):
        k = k + i
        l.append(k)
        if k > j:
            break

    desired = 0
    i = 0
    while desired <= j:
        desired += l[i]
        i += 1

    print(i - 1)

pyramids()

j = int(input())

def layers():
    n = 1
    cubes = 0
    while True:
        cubes += n
        yield cubes
        n += 1

def pyramids(total_cubes):
    for layer_num, cubes in enumerate(layers()):
        total_cubes -= cubes
        if total_cubes < 0:
            return layer_num

print(pyramids(j))

n = int(raw_input())
total = 1
req = 1
i = 1

while n >= total:
    i += 1
    req += i
    total += req

print i-1

import math
n=int(input())
p=int(1)
t=int(1)
k=int(1)
for i in range(2,10000):
    p+=i
    k+=p
    if k>n:
        print(t)
        exit(0)
    t+=1

a=int(input())
i=0
b=0
c=0
while c<a:
    i=i+1
    b=b+i
    c=c+b
    if c>a:
        i=i-1
    if c==a:
        break
print(i)

num_cubes = int(input()) # the number of cubes given to Vasya

total = 0
temp = 0
count = 0

for i in range(0,10000):
	total += i
	temp += total

	if (temp > num_cubes):
		break

	count = i

print(count)

cubes=int(input())
if cubes == 1 or cubes == 2 or cubes == 3:
    lvl = 1
else:
    lvl=2
ammount=3
cubes=cubes-4
while cubes>ammount+lvl:
    lvl+=1
    ammount=ammount+lvl
    cubes=cubes-ammount

print(lvl)

cubics=int(raw_input())
height=0
raws=[]
i=0
total=0

while True:
    i+=1
    raws.append(i)
    total+=sum(raws)
    if total<=cubics:
        height+=1
    else:
        break
print height

n=int(raw_input())
ans,chk,cnt=0,0,1
while 1:
    chk+=cnt
    ans+=chk
    if ans==n:
        print cnt
        break
    elif ans>n:
        print cnt-1
        break
    cnt+=1

n=int(raw_input())
w=t=r=0
while w<n:
    t+=1
    r+=t
    w+=r
print t if w==n else t-1

def solution(N):
	count=0
	for i in range(1,1000):
		if N<=0 or N-i*(i+1)/2<0:
			return count
		else:
			count=count+1
			N=N-i*(i+1)/2

N=int(raw_input())
print(solution(N))

a=int(raw_input())
c=0
i=0
l=0
while c<=a:
	i+=1
	l+=i
	c=c+l
print i-1

n=input()
summ=0
c=0
x=[]

for i in range(1,1000):
	summ+=i
	x.append(summ)
	if sum(x)>n:
		break;
	else:
		c+=1

print c

a = [(x*(x+1)/2+x*(x+1)*(2*x+1)/6)/2 for x in range(0,100000)]
want = input()
f=0
l=99999
m=0
#print a[:10]
while f<l :
	m=(f+l)/2
	if a[m]<want :f=m+1
	else :l=m
print f if a[f]<=want else f-1 if f-1>0 else 0

# -*- coding: utf-8 -*-
#ᕕ┌◕ᗜ◕┐ᕗ HELLO HELLO HELLO ᕕ┌◕ᗜ◕┐ᕗ

#a = tuple(int(i) for i in raw_input().strip().split(" "))
n = int(raw_input())
t = tuple((i*(i+1)*(i+2))/6 for i in range(1,40))
x = 0
while n >= t[x]:
    x += 1
if n == t[x]:
    print x+1
    print "HELLO"
else:
    print x

def main():
    n = int(raw_input())
    x = lambda y: y*(y+1)*(y+2)/6
    count = 1
    while 1:
        if x(count) > n:
            return count - 1
        count += 1

if __name__ == "__main__":
    print main()

def ret_input():
    data = int(raw_input())
    return data

def vac(data):
    index = 1
    total, row_sum = 0,0
    while total <= data:
        row_sum = (index *(1 + index))/2
        total += row_sum
        index += 1
    return index-2

def main():
    data = ret_input()
    #data = 100
    print vac(data)

if __name__ == '__main__':
    main()

x=int(raw_input())
ans=0
t=1
while(x > 0):
  ans+=t
  t+=1
  x-=t+ans
print t-1

n = int(input())
x = n - 1
count = 1
y = 1
i = 2
if(n == 1):
    print('1')
else:
       while(True):
        if (x < y):
            break;
        y = y + i
        x = x - y
        i = i + 1
        if(x >= 0):
            count = count + 1
       print(count)

#!/usr/bin/env python2

def compare(int_num_a, int_num_b):
    if int_num_a == int_num_b:
        return 0
    elif int_num_a > int_num_b:
        return 1
    else:
        return -1

def binary_search(number_list, target):
    begin = 0
    end   = len(number_list)
    while begin < end:
        mid = (begin + end) >> 1
        result = compare(number_list[mid], target)
        if 0 == result:
            return mid
        elif 1 == result:
            end = mid
        else:
            begin = mid + 1
    return begin - 1

BEGIN_LEVEL = 1
END_LEVEL   = 40
END_N       = 10002

cubes_cnt_current_level = 0
cubes_cnt_sum = [cubes_cnt_current_level, ]
for level in range(BEGIN_LEVEL, END_LEVEL):
    cubes_cnt_current_level += level
    cubes_cnt_sum.append(cubes_cnt_sum[-1] + cubes_cnt_current_level)
    if cubes_cnt_sum[-1] >= END_N:
        break

while True:
    try:
        n = input()
    except EOFError:
        break

    index = binary_search(cubes_cnt_sum, n)
    print index

#!/usr/bin/env python2

def compare(element_a, element_b):
    if element_a == element_b:
        return 0
    elif element_a > element_b:
        return 1
    else:
        return -1

BEGIN_N = 1
END_N   = 10001

n = input()
cubes_cnt_sum = cubes_cnt_current_level = 0
for level in range(BEGIN_N, END_N):
    cubes_cnt_current_level += level
    cubes_cnt_sum           += cubes_cnt_current_level
    result = compare(cubes_cnt_sum, n)
    if 0 == result:
        print level
        break
    elif 1 == result:
        print level - 1
        break

#!/usr/bin/python3

n = int(input())
i = 0
j = 0

while i <= n:
    j += 1
    i += (j*(j+1))/2
print(j - 1)

#!/usr/bin/env python2

def compare(int_num_a, int_num_b):
    if int_num_a == int_num_b:
        return 0
    elif int_num_a > int_num_b:
        return 1
    else:
        return -1

def binary_search(begin, end, target):
    while begin < end:
        mid = (begin + end) >> 1
        result = compare(mid * (mid + 1) * (mid + 2) / 6, target)
        if 0 == result:
            return mid
        elif 1 == result:
            end = mid
        else:
            begin = mid + 1
    return begin - 1

BEGIN_LEVEL = 1
END_LEVEL   = 40

n = input()
index = binary_search(BEGIN_LEVEL, END_LEVEL, n)
print index

def compare(element_a, element_b):
    if element_a > element_b:
        return True
    else:
        return False

def search_one_by_one(number_list, target):
    length = len(number_list)
    for index in range(length):
        if compare(number_list[index], target):
            return index
    else:
        return length

BEGIN_N = 1
END_N   = 10001

cubes_cnt_current_level = 0
cubes_cnt_sum = [cubes_cnt_current_level, ]
for level in range(BEGIN_N, END_N):
    cubes_cnt_current_level += level
    cubes_cnt_sum.append(cubes_cnt_sum[-1] + cubes_cnt_current_level)
    if (cubes_cnt_sum[-1] >= END_N):
        break

n     = input()
index = search_one_by_one(cubes_cnt_sum, n)
print index - 1

bla=int(raw_input())
num=1
g=0
while g<=bla:
    g+=(num)*(num+1)/2
    num+=1
if bla!=1:
    print num-2
else:
    print 1

n=int(raw_input())
sum=0
i=0
while sum<=n:
    i+=1
    sum+=(i*(i+1))/2
print i-1

n=int(input())
i=0
s=0
while(True):
    k1=i*(i+1)//2
    s+=k1
    if(s>=n):
        if(s>n):
            i=i-1
        break
    i+=1
print(i)

n = input()

blocks = 0
start = 0
startIncrement = 1
count = 0

while blocks <= n:
    start += startIncrement
    startIncrement += 1
    blocks += start
    count += 1

print count - 1

import math
c=int(input())
n=0
i=0

while n<c:

    n=n+((i*i + i)/2)
    if n<=c:
        i+=1

print(i-1)

a=int(input())
l=0;i=0;c=0
while(a>0):
      i=i+1
      c=l+i
      l=c
      a-=c
      if(a<0):
        i=i-1
print(i)

n = int(input())
cubesleft = n-1
floors = 1

if n <= 3:
    print(1)
else:
    for i in range(n):
        floors +=1
        sum = (((floors) * (floors+1)) / 2)
        cubesleft -= sum
        if sum > cubesleft+sum:
            floors -=1
            print(floors)
            break

n = int(raw_input())
i = 0
s = 0
while s <= n:
    i += 1
    s += (i*(i+1))/2
print i - 1

n = int(input())
var = 0
for i in range(1,100000):
    var += ((i*(i+1))//2)
    if var > n:
        print(i-1)
        exit()

n=int(input())
s=0
for i in range(1,10**100):
 s+=i
 if s>n:
  print(i-1)
  break
 n-=s

no_of_cubes = int(input())
data = [0]
layer =0
sum = 0
while(data[layer] <= no_of_cubes):
    layer+=1
    if layer==1:
        sum += data[layer - 1] + layer
        if sum > no_of_cubes:
            break
        else :
            data.append(layer)
    elif layer==2:
        sum += data[layer - 1] + layer
        if sum > no_of_cubes:
            break
        else :
            data.append(data[layer-1]+layer)

    elif layer > 2 :
        if data[layer-1]+layer < no_of_cubes:
            sum += data[layer - 1] + layer
            if sum > no_of_cubes:
                break
            else:
                data.append(data[layer-1]+layer)

        else:
            break

print(len(data)-1)

n=int(input())
c,k,s=0,0,0
for  i in range(1,n+2):
  if k>n:
    break
  else:
    s=s+i
    k=s+k
    c+=1
print(c-1)

cubes = int(input())

h=0
while cubes>=0:
	h+=1
	cubes-=(h*(h+1))//2
print(h-1)

cubes = int(input())
height = 0
while True:
    if cubes >= ((height + 1)*height/2):
        cubes = cubes - ((height + 1)*height/2)
        height = height + 1
    else:
        break
print(height-1)

cubes = int(input())

d=cnt=h=0

while cubes>0:
	d+=1
	cnt+=d
	if cnt<=cubes:
		cubes-=cnt
		h+=1
	else:
		break
print(h)

squareNumber = int(input())
totalsum = 0
i = 0
while True:
    if(squareNumber >=1 and squareNumber <= 10**4):
        break
    else:
        print("Write the right number")
        squareNumber = int(input("Write the number of the squares"))
while (squareNumber > totalsum):
    totalsum = 0
    for sqare in range(1,i+2):
        totalsum+=sqare
    squareNumber-=totalsum
    if(squareNumber >= 0):
        i+=1
print(i)

n = int(raw_input())

x = 1
y = 0
r = 1

for i in range(1, n):
    x = (i * (i + 1) ) / 2
    y += x
    if y > n:
        r = i-1
        break

print r

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

n=i=input()*6
while i**3-i>n:i-=1
print i-1

def sm(n):
    return (1+n)*n/2

def main():
    n = int(raw_input())
    r = 1
    while True:
        n -= sm(r)
        if n < 0:
            print r-1
            return
        r += 1

main()

n = int(input())
row, cubes_in_row = 0, 0

cubes = 0
while cubes <= n:
    row += 1
    cubes_in_row += row
    cubes += cubes_in_row

print(row -1 )

# while n >= cubes_in_row + row + 1:
#     row += 1
#     cubes_in_row += row
#     n -= cubes_in_row
# print(row)

n=int(raw_input())
count=0
h=1
while count<n:
    h+=1
    count+=h*(h+1)/2
print h-1

def main():
    n = 1
    i = 2
    x = int(input())
    while n < x + 1:
        n += ((i * (i + 1)) // 2)
        i += 1
    print(i - 2)

main()

n = input()
ans = 0
i = 1
while (ans < n) :
	ans += (i * (i + 1))/2
	i += 1
if (ans == n) :
	print i - 1
else :
	print i - 2

n=int(input())
m=0#колличество кубиков в одном уровне
i=0#номер уровня
while n>=m:
    m=m+i+1
    if n>=m:
        n=n-m
        i+=1
print(i)

cubes = int(input())
if cubes == 1:
  print(1)
else:
  total = 0
  r_cube = 0
  h = 0
  for i in range(1, cubes):
    total += i
    r_cube += total
    if r_cube > cubes:
      break
    h += 1
  print(h)

n = int(input())
num = 0
num2 = 0
count = 2
while True:
    for i in range(count):
        num += i
    num2 += num
    if num2 > n:
        print(count - 2)
        break
    if num2 == n:
        print(count - 1)
        break
    num = 0
    count += 1

def trial():
    num = int(input())
    levels = []
    for i in range(1, num + 1):
        counter = 0
        for j in range(i+1):
            counter += j
            if counter >= num:
                levels.append(counter)
                break
            elif counter < num and counter not in levels:
                levels.append(counter)
        if levels[-1] > num:
            break
    levels.pop(0)
    if len(levels) == 1:
        return print(1)
    res = 0
    counter = 0
    for i in levels:
        if res < num:
            counter += 1
            res += i
            if res > num:
                counter -= 1
                return print(counter)
        else:
            return print(counter)
    return print(counter)
trial()

n = int(input())

a = 0
ip = 0
ipc = 0

while n > ipc:
    a += 1
    ip += a
    ipc += ip

if n < ipc:
    print(a - 1)
else:
    print(a)

import sys
import itertools as it
import bisect as bi
import math as mt
import collections as cc
S=lambda :list(input().split())
I=lambda:list(map(int,input().split()))
n,=I()
f=lambda x:x*(x+1)//2
ar=[f(i) for i in range(100)]
for i in range(1,len(ar)):
	ar[i]+=ar[i-1]
print(bi.bisect(ar,n)-1)

n=int(input())
d,c,m,i=0,1,1,1
while c<=n:
    d+=1
    i+=1
    m+=i
    c+=m
print(d)

def function():
	n = int(input())

	floor = 0
	while n > 0:
		if n >= (floor+1)*(floor+2)//2:
			n -= (floor+1)*(floor+2)//2
			floor += 1
		else:
			print(floor)
			return
	print(floor)

function()

h,counter=0,0
n=int(input())
while(counter<=n):
    h+=1
    counter+=((h)*(h+1))//2
print(h-1)

n = int(input())
ans = 0
count = 0
while count <= n:
    ans += 1
    count +=((ans*(ans+1)) // 2)
print(ans-1)

from math import factorial as fct

def ps(n,m):
	return int(fct(n)/(fct(m)*fct(n-m)))

def cl(n):
	return ps(n+2,3)

def cdt(n):
	dt=dict()
	for x in range(n):
		x+=1
		dt[cl(x)]=x
	return dt

def dl(dt,n):
	v=list(dt.keys())
	for x in range(len(v)):
		if v[x+1] > n:
			return v[x]

dt=cdt(39)
l=dl(dt,int(input()))
print(dt[l])

cubics=int(input())
i=1
n=0
while (n<=cubics):
    n+=(i*(i+1))//2
    #print(n)
    i+=1
if(cubics==1):
    print(1)
else:
    print(i-2)

n,k,i = int(input()),1,1
while(n>=k):n-=k;i+=1;k+=i
print(i-1)

n = int(input())
k = 0
m = 0
z = 0
for i in range(10000):
    k += i
    m += k
    z += 1
    if m > n:
        break
print(z-2)

n = int(input())
totalCubes = 0
nextLevel = 0
i = 0
while totalCubes <= n:
    i += 1
    nextLevel += i
    totalCubes += nextLevel

print(i - 1)

n = int(input())
i=1
sum=0
x = n-sum
cnt=0
while(x>0):
    sum+=i
    cnt+=1
    i += 1
    n-=sum
    x=n-sum

if(n<0):
    print(cnt-1)
else:
    print(cnt)

i=int(input())
count=0
k=0
sum=0

while sum+count+k+1<=i:
    k=k+1
    count=count+k
    sum=sum+count

print(k)

n=int(input())
lvl=0
x=0
i=1
while n>=x+i:
    x+=i
    i += 1
    lvl+=1
    n-=x
print(lvl)

'''
https://codeforces.com/problemset/problem/492/A

Solution:

Say n = 25.

Per layer Boxes   | Total Boxes Used
1                 |      1
1+2 = 3           |      4
1+2+3 = 6         |     10
1+2+3+4 = 10      |     20
1+2+3+4+5 = 15    |     35

Hence at each layer, we add the height (incremented by 1 in each layer) to the previous-layer boxes and that
gives the current layer boxes. Keep adding that to a total accumulation (boxesUsed).

Since we cannot build a layer without having enough boxes for the current-layer, we may over-estimate the height.
Hence, we check if n < boxesUsed after the current layer usage, we reduce the height by 1, thereby descarding the
current layer in the pyramid.

The final height is the answer.

'''

def solve(n):

    height = boxesUsed = prevStepBoxes = 0

    while n > boxesUsed:

        height += 1
        thisStepBoxes = prevStepBoxes + height
        boxesUsed += thisStepBoxes
        prevStepBoxes = thisStepBoxes

        #if this layer is not possible, we over-estimated the height. Reduce it by 1
        if n < boxesUsed:
            height -= 1

    return height

if __name__ == "__main__":
    n = int(raw_input())
    print solve(n)

n=int(input())

m=0#колличество кубиков в одном уровне

i=0#номер уровня

while n>=m:

    m=m+i+1

    if n>=m:

        n=n-m

        i+=1

print(i)

#!/usr/bin/env python
def height():
    n = int(input())
    h = 1
    i = 1
    if i < 1:
        return 0
    elif n == 1:
        return 1
    while i <= n:
        h += 1
        i += (h*(h+1))/2
    return h-1

print(height())

n=int(input())
s=0
v=0
i=1
while(v<=n):
    s=s+i
    v=v+s
    i=i+1
print(i-2)

n=int(input())
n_y=1
yr=1
n-=1
while n>n_y:
    yr=yr+1
    n_y=n_y+yr
    n=n-n_y
    if n<0:
        yr-=1
print(yr)

def GH(a,i):
    if a<0:return i-2
    else:return GH(a-i*(i+1)/2,i+1)
print(GH(int(input()),1))

l=[1]
for i in range(1,10001):
    l.append(l[i-1]+i+1)
n=int(input())
s=0
if n==1:
    print('1')
else:
    for i in range(len(l)):
        s+=l[i]
        if n<s:
            print(i)
            break

n = int(input())
g = 0
i = 0
ans = 0
while n - g - i  > 0:
    i +=1
    g +=i
    n -=g
    ans +=1
print(ans)

n = input()

count = 0
for i in range(1, 100000):
    count += i * (i + 1) / 2

    if count > n:
        print i - 1
        break

n=int(input())
n1=0
count=0
while n>n1:
    count+=1
    count2=count
    n1 = 0
    while count2!=0:
        n1=n1+count2
        count2=count2-1
    n = n - n1
print(count)

cubes = int(input())
if cubes == 1:
  print(1)
else:
  total = 0
  h = 0
  hi = 0
  for i in range(1, cubes):
    total += i
    h += total
    if h >= cubes:
      break
    hi += 1
  print(hi+1)

n = int(input())
i = 1
c = 0
j = 0
k = 0
while j + c < n:
    c += i
    i += 1
    j += c
    k += 1
print(k)

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

bla=int(raw_input())
num=1
g=0
while g<=bla:
    g+=(num)*(num+1)/2
    num+=1
if bla!=1:
    print num-1
else:
    print 1

n = int(input())
num = 0
num2 = 0
count = 2
while True:
    for i in range(count):
        num += i
    num2 += num
    if num2 > n:
        print(count - 1)
        break
    if num2 == n:
        break
    num += count
    count += 1

n=int(input())
i=0
c=0
while n>=i:
    c=c+1
    i=i+c
    n=n-i
print(c)

a = int(input())
sum = 0
k = 0
while sum < a:
    sum = sum + k
    k += 1
print(k-1)

n=int(raw_input())
i=1
while n>0:
    t=sum(range(1,i+1))
    if t>n:
        break
    n-=t
    print t,n
    i+=1
print i-1

from math import cosh,acosh

N=float(input())
sq3=3**0.5
L=2./sq3*cosh(acosh(9*sq3*N)/3.)-1
print(int(L+0.01))

i = int(input())
s = int(0)
result = []
for x in range(1,i+1):
    if i < x:
        break
    s = s + x
    i = i -s
    result.append(s)

print(len(result))

n=int(input())
s,d,r=0,0,0
for i in range(1,n+1):
    s=s+i
    d+=s
    if(d>n):
        break
    if(d==n):
        r=r+1
        break
    r=r+1
    print(s,d,r)
print(r)

n=int(input())
k=0
h=0
while n>0:
    k=1+k+h
    h=h+1
    n=n-k
print(h)

n = int(input())
m=0
m+=n
sum = 0
count = 0
if n ==1:print(1)
else:
    for i in range(1,m):

        sum +=i
        n = n-sum
        count+=1
        if(sum> n):
            break

    print(count)

n = int(input())
cubesused = 0
cubesleft = n
floors = 1

if n <= 3:
    print(1)
else:
    for i in range(n):
        if (((floors) * (floors+1)) / 2) <= (cubesleft-(((floors) * (floors+1)) / 2)):
            floors +=1
            cubesleft -= (((floors) * (floors+1)) / 2)
        else:
            print(floors)
            break

n = int(input())
a = 1
i = 1
while n - a >= 0 and n-(a-1) >= a:
    i = i+1
    a = a+i
print(i-1)

n = int(input())
i = 0
a = 1
while (n>a):
    i += 1
    a += i
    n -= a
print(i)

n=input()
emp=0
i=1
while(True):
    emp=emp*2+i
    if emp+i>=n:
        break
    else:
        i+=1
print i

n=int(input())
lvl=0
p=0
c=1
s=0
while s<n:
    n=n-p
    p=p+c
    c=c+1
    s=s+p
   # print(p)
    lvl=lvl+1
print(lvl)

n = 60
s = 0
k = 0
i = 0

while True:

    i += 1
    k += i

    if s + k > n:
        break

    s += k

print i - 1

N = int(input())
i, ans = 1, 0
while True:
	sum = (i*(i+1))/2
	if sum <= N: ans += 1
	if sum >= N: break
	i += 1
print ans

i = 1
count,sum=1,1
n = input()
while(i<n):
    sum+=1
    count+=1
    i+=i
    i+=sum
print count

n=int(input())
i=0
while n: n-=(i*(i+1))//2; i+=1
print(i)

n = int(input())
floor = 0
x1 = 1
x2 = 0
sun = 0
if n > 0:
    while n > 0:
        x1 = x1 + x2
        sun = x1 + x2
        x1 += 1
        x2 += 1
        floor += 1
        n -= sun
    print(floor)
elif n - sun != 0:
    print(floor - 1)
else:
    print(0)

n = int(input())
i = 0
b=0
while n > i:
    i+=(1 + b)
    n-=i
    b+=1
print(b)

l=[1]
for i in range(1,10001):
    l.append(l[i-1]+i+1)
n=int(input())
for i in range(len(l)):
    if n<l[i]:
        print(i-2)
        break

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

n = int(input())

ip = 0
a = 1

if n == 1:
    print(1)
elif n == 2:
    print(2)
else:
    while n > ip:
        ip = ip + (ip + a)
        a += 1

    if ip > n:
        a -= 1

    print(a)

n = int(input())
ans = 0
g = 0
for i in range(1,n):
    if i + g  < n - i - g:
        n -=(i + g)
        g +=i
        ans +=1
    else:
        break
print(ans+1)

x = input()
l = 0
m = 0
s = 0
while s <= x:
    l += 1
    m += l
    if s + m <= x:
        s += m
    else:
        print l
        exit()

try:
    x=int(input())
    q=0
    t=0
    while True:
        x=x-((q+2)*(q+1)//2)
        if x>0:
            q=q+1
        else:
            break
    print(q)
except:
    pass

i=int(input())
t=0
sumi=0
l=0
while(i>=0):
 print(i,l,t)
 l=l+1
 t=t+l
 i=i-t
print(l-1)

n = int(input())
floor = 0
x1 = 1
x2 = 0
sun = 0
if n > 0:
    while n > 0 and n >= sun:
        x1 = x1 + x2
        sun = x1 + x2
        x1 += 1
        x2 += 1
        floor += 1
        n -= sun
    print(floor)
elif n - sun != 0:
    print(floor - 1)
else:
    print(0)

n=int(input())
i=1
height=1
count=1
while i<n:
    height+=1
    i+=height
    count+=i
print(height-1 if n!=1 else 1)

n=int(input())
i=1
s=0
while(True):
    k1=i*(i+1)//2
    s+=k1
    if(s>=n):
        break
    i+=1
print(i)

def main():
    n = 2
    i = 2
    prev = 1
    x = int(input())
    while n < x:
        n = n + prev + i
        i += 1
        prev = n
    print(i - 1)

main()

def count():
    n = int(raw_input())
    num = 1
    result = 0
    height = 0
    total = []
    while sum(total) < n:
        result += num
        num += 1
        total.append(result)
        height += 1

    print height - 1

count()

def driver(f):
    n = 0
    counter = 0
    total = 0
    for i in range(1, f):
        if total+n < f:
            n += i
            total += n
            counter += 1
        else:
            break
    if f == 1:
        print(1)
    else:
        print(counter)

def main():
    for i in range(1):
        driver(int(input()))

if __name__ == "__main__":
    main()

n = int(raw_input())
#print list(range(0, n))
sum1=0
sum2 = 0
if n==1:
    print 1
elif n==2:
    print 1
else:
    for i in range(n):
        sum1 = i+sum1
        sum2 = sum2 + sum1
        #print sum1
        if n - sum2 <=0:
            print i-1
            break

print lambda n: max (x for x in xrange(100) if (x * (x + 1) * (x + 2) / 6 <= n))(input())

def sum_def(n):
    out = 0
    for i in range(1, n + 1):
        for i in range(1, i + 1):
            out += i
    return out

n = int(input())
sum_tmp = 0
c = 0

while (sum_tmp < n):
    print(sum_def(c + 2))
    sum_tmp = sum_def(c + 2)
    c += 1

print(c)

a=int(input())
sum=0
a1=1
k=1
cnt=0
while a>=0 :
    sum=sum+a1
    k=k+1
    a1=a1+k
    cnt=cnt+1
    a=a-a1
print(cnt)

n = int(raw_input())
t = 1
for k in xrange(2, n):
	g = ((k * (k + 1)) >> 1)
	if t + g <= n:
		t += g
	else: break
print t

n = int(input())
ans = 1
g = 0
if n >=4:
    for i in range(1,n):
        if i + g  < n - i - g:
            n -=(i + g)
            g +=i
            ans +=1
        else:
            break
if n <=19 and n >=4:
    print(ans - 1)
else:
    print(ans)

# n = int(input())
n = 26
a = 1
b = 0
s = 1
while a < n:
    b += a + 1
    a += b
    s += 1
print(s)

#!/usr/bin/env python

n = int(input())
count = 1
i = 1

while count < n:
    i += 1
    count += (i + 1) * (i + 2) / 2

print(i)

n = int(input())
h = 0
s = 0
sm = 0
while(sm <= n):
	h += 1
	s += h
	sm += s
	if(sm + s >= n):
		break
print(h)

l=[1]
for i in range(1,20):
    l.append(l[i-1]+i+1)
n=int(input())
s=0
if n==1:
    print('1')
else:
    for i in range(len(l)):
        s+=l[i]
        if n<s:
            print(i)
            break

n=int(input())
a=2
c=0
if n>1:
	d=1
	l=[]
	for i in range(1,n+1):
		if n>=sum(l):

			# print(d)
			# print(d,a,c)
			c+=1
			d+=a
			a+=1
			l.append(d)
	print(c)
elif n==1:
	print(1)
else:
	print(0)

import sys
def main():
    n = int(input()) + 1
    a = [0] * n
    _sum = 0
    for i in range(1, n):
        a[i] = a[i - 1] + i
        _sum += a[i]
        if(_sum > n):
            print(i - 1)
            return
        if(_sum == n - 1):
            print(i)
            return

if __name__ == "__main__":
    sys.exit(main())

n=int(input())
s,d,r=0,0,0
for i in range(1,n+1):
    s=s+i
    d+=s
    if(d>n):
        break
    if(d==n):
        r=r+1
        break
    r=r+1
    print(s,d,r)
print(r)

n=int(raw_input())
count =0
level=1
while (level<=n):
    count +=1
    n= n - level
    level=(count+1)/2.0*(1+count)

print count

# -*- coding: utf-8 -*-
"""
Created on Mon Mar 16 12:54:40 2020

@author: DELL
"""
n=int(input())
c=0
s=0
u=0
if n!=1 and n!=2:
    for i in range(1,n+1):
        s+=i
        u+=s
        c+=1
        if u>n:
            print(c-1)
            break
        elif u==n:
            print(c)
            break
else:
    print(n)

n=int(raw_input())
i=1
while n>0:
    t=sum(range(1,i+1))
    if t>n:
        break
    n-=t
    print t,n
    i+=1
print i-1

x = int(input())

r = 0

for i in xrange(1, x):
	r += 1 + 2 + (i - 1) + i

	if r > x:
		print i
		exit(0)

print 1

target = int(input())
sum = 1
passer = 0
flag = 0
while sum < target:
    passer = sum
    sum += 1
    sum += passer
    flag += 1
print(flag)

x=int(input())
p=1
c=0
s=0
i=2
while x>=1:
    c+=1
    x=x-p

    p=p+i
    i=i+1

if(c>1):
    print(c-1)
else:
    print(c)

x=int(input())
p=1
c=0
s=0
i=2
while x>=1:
    c+=1
    x=x-p

    p=p+i
    i=i+1

if(c>3):
    print(c-1)
else:
    print(c)

n = int(input())
i = 1
py = 0
count = 0
if n == 1:
    print("1")
else:
    while(1):
        py += i
        i += 2
        if py >= n:
            break;
        count += 1
    print(count)

a = int(input())
b = a
caunt = [0]
caunt2 = 0
while a > sum(caunt):
    caunt.extend(caunt)
    caunt.append(caunt[-1] + 1)
    caunt2 += 1
print(caunt2)

x = int(input())
p = 0
d = 0
j = 0
for i in range(1,x+1):
        p = p+i
        if (d+p)<x:
            d+=p
            j+=1
        elif x>11:
            print(j+1)
        else:
            print(j)
            break

n=int(input())
i=0
s=0
while(True):
    k1=i*(i+1)//2
    s+=k1
    if(s>=n):
        break
    i+=1
print(i)

c=int(input())
k=0
for i in range(1,c):
    s=0
    for j in range(1,i+1):
        s=s+j

    k=s+k

    if(k>=c):
        print(i-1)
        break

n = int(input())
a = 0
count = 0
while a <= n:
	count += 1
	a += count
	print(a)
print(count - 1)

n =int(input())
count = 0
level = 0
while n > level and n - level >= level:
    count+=1
    level = level + count
    n = n - level
print(count)

n=int(input())
s=0
v=0
i=0
while(v<n):
    s=s+i
    v=v+s
    i=i+1
print(i-1)

l=[1]
for i in range(1,10001):
    l.append(l[i-1]+i+1)
n=int(input())
for i in range(len(l)):
    if n<l[i]:
        print(i-2)
        break

num_of_cubes = int(input())
last_cubes = 1
stage = 1
cubes = 1
while num_of_cubes >= cubes + last_cubes + 1:
    stage += 1
    cubes += last_cubes + 1
    last_cubes += 1
print(stage)

x=int(input())
p=1
c=0
s=0
i=2
while x>=1:
    x=x-p
    p=p+i
    i=i+1
    c+=1

if(c>1):
    print(c-1)
else:
    print(c)

n = int(input())
x = 1
while n > sum(range(x+1)):
    x += 1
if n == sum(range(x+1)):
    print(x)
else:
    print(x-1)

n = int(input())
cubesused = 0
cubesleft = n
floors = 1

if n <= 3:
    print(1)
else:
    for i in range(n):
        if (((floors) * (floors+1)) / 2) <= cubesleft:
            floors +=1
            cubesleft -= (((floors) * (floors+1)) / 2)
        else:
            print(floors-1)
            break

n = int(input())
count = 0
result = 0
ls = []
for i in range(1,n+1):
    ls.append(i)
    result += sum(ls)
    if result >= n:
        break
    count+=1
if count == 0:
    count += 1
print(count)

n = int(input())

i = 1

while n > i :
    n //= i
    i +=1

print(i)

x=int(input())
i=0
k=1
c=0
while x-i>0:
    i=i+k
    x=x-i
    c=c+1
    k=k+1
print (c)

n=int(input())
n_y=1
yr=1
while n>n_y:
    yr=yr+1
    n_y=n_y+yr
    n=n-n_y
    if n<0:
        yr-=1
print(yr)

cube = int(input())
m = 0
k = 1

while True:
  m += k
  m +=m
  if m>=cube:
      break
  k += 1

print(k)

a=int(input())
k=1
r=0
while a>k:
    a-=k
    k+=(k+1)
    r+=1
print(r)

n = int(input())
i = 0
b=0
while n > i+(1 + b):
    i+=(1 + b)
    n-=i
    b+=1
print(b)

n = int(input())

ip = 0
a = 1

if n == 1:
    print(1)
else:
    while n > ip:
        ip1 = ip
        ip = ip + (ip + a)
        a += 1

    if ip > n:
        a -= 1
    print(a)

n = int(input())
a = 0
count = 0
while a <= n:
	count += 1
	a += count
	print(a)
print(count - 1)

blocks=int(input())
for i in range(1,999):
    summation = 0
    for a in range(1,i+1):
        summation +=a
    blocks-=summation
    if blocks <= 0:
        i-=1
        break
print(i)

n=int(input())
if n==1:
    print(n)
else:
    i=0
    ch=1
    while n>ch:
        i+=1
        ch+=i
        n-=ch
    print(i)

n = int(input())
digits=list(str(n))

cond=0

luckylist=[]
for i in range(1,1000):
    rm4=str(i).replace('4','')
    rm47=rm4.replace('7','')
    if (not rm47):
        luckylist.append(i)

for j in range(len(luckylist)):
    if n%luckylist[j]==0:
        cond+=1
    else:
        continue

if cond>0:
    print('YES')
else:
    print('NO')

# if it could be evenly divided by some lucky number.

squareNumber = int(input())
totalsum = 0
i = 0
while True:
    if(squareNumber >=1 and squareNumber <= 10**4):
        break
    else:
        print("Write the right number")
        squareNumber = int(input("Write the number of the squares"))
while (squareNumber > totalsum):
    totalsum = 0
    for sqare in range(1,i+2):
        totalsum+=sqare
    squareNumber-=totalsum
    if(squareNumber > 0):
        i+=1
print(i)

l=[1]
for i in range(1,20):
    l.append(l[i-1]+i+1)
n=int(input())
if n==1:
    print('1')
else:
    for i in range(len(l)):
        if n<l[i]:
            print(i-2)
            break

x = int(input())
p = 0
d = 0
j = 0
for i in range(1,x+1):
        p = p+i
        if (d+p)<x:
            d+=p
            j+=1
        elif x>11:
            print(j+1)
        else:
            print(j)
            break

n=int(input())
i=1
height=1
count=1
while i<n:
    height+=1
    i+=height
    count+=i
print(height-1 if n!=1 else 1)

def main():
    n = int(input())
    total_cubes = 0
    q = 0
    while total_cubes <= n:
        q += 1
        total_cubes += (q * q+1) // 2
    print(q - 1)

if __name__ == "__main__":
    main()


import sys

a = b = c = 0
n = input()
nums = map(int, sys.stdin.readline().split())
a = sum(nums[::3])
if n > 1:
    b = sum(nums[1::3])
if n > 2:
    c = sum(nums[2::3])

if a > b:
    if a > c:
        print "chest"
    else:
        print "back"
else:
    if b > c:
        print "biceps"
    else:
        print "back"

n = int(input())
b = list(map(int, input().split()))
chest = 0
biceps = 0
back = 0
u = 0
for i in range(n):
    if u == 0:
        chest += b[i]
        u += 1
    elif u == 1:
        biceps += b[i]
        u += 1
    else:
        back += b[i]
        u = 0
if chest > biceps and chest > back:
    print("chest")
elif biceps > chest and biceps > back:
    print("biceps")
else:
    print("back")

n=int(input())
l=list(map(int,input().split()))

chest=0
biceps=0
back=0

for i in range(1,n+1):
    if i%3==1:
        chest+=l[i-1]
    elif i%3==2:
        biceps+=l[i-1]
    else:
        back+=l[i-1]
if(chest>=biceps and chest>= back):
    print("chest")
elif(biceps>=chest and biceps>=back):
    print("biceps")
else:
    print("back")

n = int(input())
a = list(map(int, input().split()))
muscles = [0, 0, 0]
answer = ["chest", "biceps", "back"]

for i in range(len(a)):
    if i % 3 == 0:
        muscles[0] += a[i]
    elif i % 3 == 1:
        muscles[1] += a[i]
    else:
        muscles[2] += a[i]

strongest = muscles.index(max(muscles))
print(answer[strongest])

c,bi,ba=[],[],[]
s='back'
a=int(input())
ex=list(map(int,input().strip().split()))
for i in range(len(ex)):
    if(i%3==0):
        c.append(ex[i])
    elif(i%3==1):
        bi.append(ex[i])
    else:
        ba.append(ex[i])
x=sum(c)
y=sum(bi)
z=sum(ba)
if(x>y):
    if(x>z):
        s='chest'
else:
    if(y>z):
        s='biceps'
print(s)

n = int(input())
l = list(map(int, input().split()))
chest = 0
biceps = 0
back = 0
chest = l[::3]
biceps = l[1::3]
back = l[2::3]
chest = sum(chest)
biceps = sum(biceps)
back = sum(back)
if biceps > back and biceps > chest:
    print('biceps')
elif chest > biceps and chest > back:
    print('chest')
else:
    print('back')

x = int(input())
l = input().split()
a = [0,0,0]
for i,y in enumerate(l):
    y = int(y)
    if (i%3==0):
        a[0]+=y
    elif (i%3==1):
        a[1]+=y
    elif (i%3==2):
        a[2]+=y
x = max(a)
if (a[0]==x):
    print("chest")
elif(a[1]==x):
    print("biceps")
elif(a[2]==x):
    print("back")

t=int(input())
l=list(map(int,input().split()))
countc=0
countbi=0
countb=0
for i in range(0,t,3):
    countc+=l[i]
    if i+1<t :
        countbi+=l[i+1]
    if i+2<t:
        countb+=l[i+2]
if (max(countc,countbi,countb)==countc):
        print("chest")
elif (max(countc,countbi,countb)==countbi):
        print("biceps")
elif (max(countc,countbi,countb)==countb):
        print("back")

# import sys
# sys.stdin=open('input.in','r')
# sys.stdout=open('output.out','w')
s=int(input())
l=list(map(int,input().strip().split()[:s]))
bicep=chest=back=0

if len(l)%3!=0:
	for x in range(3-(len(l)%3)):
		l.append(0)
x=0
while x<len(l):
	chest+=l[x]
	bicep+=l[x+1]
	back+=l[x+2]
	x+=3
if max(chest,bicep,back)==chest:
	print('chest')
elif max(chest,bicep,back)==bicep:
	print('biceps')
else:
	print('back')

n = int(input())
a = [int(x) for x in input().split()]
c, bi, ba = 0,0,0
for i in range(1,n+1):
    if i%3==0:
        ba+=a[i-1]
    elif i%3==1:
        c+=a[i-1]
    else:
        bi += a[i-1]
#print(c)
#print(bi)
#print(ba)
if max(c,bi,ba)==c:
    print("chest")
elif max(c,bi,ba)==bi:
    print("biceps")
else:
    print("back")

n=int(input())
l=list(map(int,input().split()))
c=bi=ba=0
j=1
for i in range(1,n+1):
    if j==1:
        c+=l[i-1]
        j+=1
    elif j==2:
        bi+=l[i-1]
        j+=1
    else:
        j=1
        ba+=l[i-1]
#print(c,bi,ba)
if c>bi and c>ba:
    print('chest')
elif bi>c and bi>ba:
    print('biceps')
elif ba>bi and ba>c:
    print('back')
else:
    print('unambiguous')

n = int(input())
arr = [int(x) for x in input().split()]
ans = {0:['chest',0],1:['biceps',0],2:['back',0]}
for i in range(len(arr)):
    ans[i%3][1] += arr[i]

print(ans[max(ans.keys(),key=(lambda k:ans[k][1]))][0])

n = int(input())
a = list(map(int,input().split()))
sum1 = 0
sum2 = 0
sum3 = 0
for i in range(n):
    if i % 3 == 0:
        sum1 += a[i]
    if i % 3 == 1:
        sum2 += a[i]
    if i % 3 == 2:
        sum3 += a[i]

if max(sum1, sum2, sum3) == sum1:
    print('chest')
if max(sum1, sum2, sum3) == sum2:
    print('biceps')
if max(sum1, sum2, sum3) == sum3:
    print('back')

n=int(input())
a=[int(x) for x in input().split()]
chest,biceps,back=0,0,0
count=0
for i in range(1,n+1):
    count+=1
    if (count%3==0):
        back+=a[i-1]
        count=0
    elif (count%2==0):
        biceps+=a[i-1]
    else:
        chest+=a[i-1]
dic=dict({'chest':chest,'biceps':biceps,'back':back})
print(max(dic,key=dic.get))

a=int(input())
lis=list(map(int,input().split()))
c=0
b=0
ba=0
for i in range(a):
    if(i%3==0):
        c+=lis[i]
    elif(i%3==1):
        b+=lis[i]
    else:
        ba+=lis[i]
ans=max(c,b,ba)
if(c==ans):
    print("chest")
elif(b==ans):
    print("biceps")
else:
    print("back")

def ii():
	return int(input())
def mi():
	return map(int, input().split())
def si():
	return [int(x) for x in input().split()]
def ss():
	return [x for x in input()]

a = ii()
s = si()
b = []
for i in range(3):
	b.append(sum(s[i::3]))
if b[0] == max(b):
	print("chest")
elif b[1] == max(b):
	print("biceps")
else:
	print("back")

t=int(input())
a=list(map(int,input().split()))
c=0
bi=0
b=0
for i in range(0,t,3):
    c=c+a[i]
    if i+1<t :
        bi=bi+a[i+1]
    if i+2 <t:
        b=b+a[i+2]
if c>bi and c>b:
    print("chest")
if bi>c and bi>b:
    print("biceps")
if b>bi and b>c:
    print("back")

a=int(input())
b=list(map(int,input().split()))
back=sum(b[2::3])
chest=sum(b[::3])
bic=sum(b[1::3])
c=max(back,chest,bic)
if back==c:print('back')
elif chest==c:print('chest')
else:print('biceps')

n, a = input(), map(int, raw_input().split())
e = [sum(a[i::3]) for i in [0,1,2]]
print dict(zip(e, ['chest', 'biceps', 'back']))[max(e)]

n=int(input())
l=list(map(int,input().split()))
#c,bi,bk=0,0,0
a=[0]*3
for i in range(n):
    a[i%3]+=l[i]
if a[0]>a[1] and a[0]>a[2]:
    print("chest")
elif a[1]>a[0] and a[1]>a[2]:
    print("biceps")
else:
    print("back")

n = int(input())
s = ["c", "bi", "ba"]
d = {}
ans = [0, 0, 0]
for ind, i in enumerate(map(int, input().split())):
    d.setdefault(s[(ind % 3)], [0])[0] += i
for i in d:
    if i == 'c':
        ans[0] = d[i][0]
    elif i == 'bi':
        ans[1] = d[i][0]
    else:
        ans[2] = d[i][0]

if ans[0] > ans[1] and ans[0] > ans[2]:
    print("chest")
elif ans[1] > ans[0] and ans[1] > ans[2]:
    print("biceps")
else:
    print("back")

n = int(input())
a = list(map(int, input().split()))
chest = 0
biceps = 0
back = 0
for i in range(n):
    if i % 3 == 0:
        chest += a[i]
    elif i % 3 == 1:
        biceps += a[i]
    elif i % 3 == 2:
        back += a[i]
if biceps > chest and biceps > back:
    print('biceps')
elif chest > biceps and chest > back:
    print('chest')
else:
    print('back')

n = int(input())
a = list(map(int, input().split()))
x = 0
y = 0
z = 0
for i in range(0,n,3):
    x += a[i]
for j in range(1,n,3):
    y += a[j]
for k in range(2,n,3):
    z += a[k]
if max(x,y,z) == x:
    print('chest')
elif max(x,y,z) == y:
    print('biceps')
else:
    print('back')

n=int(raw_input())
l=[int(x) for x in raw_input().split()]
ans=["chest","biceps","back"]
t=0
chk=[0,0,0]
for i in range(n):
    if t==0:
        chk[0]+=l[i]
        t+=1
    elif t==1:
        chk[1]+=l[i]
        t+=1
    else:
        chk[2]+=l[i]
        t=0
print ans[chk.index(max(chk))]

a=int(input())
b=list(map(int,input().split()))
ba=bi=c=x=int(0)
for x in range(a):
	if x%3==0:
		c=c+b[x]
	elif x%3==1:
		bi=bi+b[x]
	else:
		ba=ba+b[x]
if ba>bi and ba>c:
	print("back")
elif bi>ba and bi>c:
	print("biceps")
else:
	print("chest")

n = int(input())
l = list(map(int,input().split()))
c1, c2, i = 0, 0, 0
while i<n:
	if i%3==0:
		c1+=l[i]
	if i%3==1:
		c2+=l[i]
	i+=1
if max(c1,c2,sum(l)-c1-c2)==c1:
	print("chest")
elif max(c1,c2,sum(l)-c1-c2)==c2:
	print("biceps")
else:
	print("back")

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

k = 1
def mod_expo(n, p, m):
	"""find (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 is_prime(n):
	m = 2
	while m*m <= n:
		if n%m == 0:
			return False
		m += 1
	return True

def find_sum(n, a):
	a.insert(0, 0)
	for i in range(1, n+1):
		prev = a[i] & a[i-1]
		cur = a[i] | a[i-1]
		a[i-1] = prev
		a[i] = cur
	return sum(m*m for m in a)

def prin_abc(x, y, z):
	l = [x, y, z]
	l.sort()
	if l[1] < l[2]:
		print("NO")
		return
	a = b = l[0]
	c = l[2]
	print("YES")
	print(a, b, c)

def get_scores(n, vals):
	l = 0
	r = n-1
	turn = 0
	sereja = 0
	dima = 0
	while l <= r:
		if vals[l] > vals[r]:
			cur = vals[l]
			l += 1
		else:
			cur = vals[r]
			r -= 1
		if turn == 0:
			sereja += cur
		else:
			dima += cur
		turn = not turn
	print(sereja, dima)

def count_lamps(n, m):
	return (n*m + 1)//2

def find_holidays(n):
	cnt = 2*(n//7)
	rem = n%7
	#if n < 7:
	#	print(0, cnt)
	mx = mn = cnt
	if rem == 1:
		mx += 1
	elif rem > 1:
		mx += 2
	if rem == 6:
		mn += 1

	print(mn, mx)

def count_eggs(n, s, t):
	return max(1, max(n-s+1, n-t+1))

def find_best(n, a):
	chest = 0
	biceps = 0
	back = 0
	for i in range(n):
		if i%3 == 0:
			chest += a[i]
		elif i%3 == 1:
			biceps += a[i]
		else:
			back += a[i]
	if chest > max(biceps, back):
		print("chest")
	elif biceps > max(chest, back):
		print("biceps")
	else:
		print("back")

t = 1
#t = int(input())
while t:
	t = t - 1
	k, g = 0, 0
	points = []
	n = int(input())
	#a = input()
	#b = input()
	#s, v1, v2, t1, t2 = map(int, input().split())
	#n, s, l = map(int, input().split())
	#print(discover())
	# = map(int, input().split())
	a = list(map(int, input().strip().split()))[:n]
	#w = list(map(int, input().strip().split()))[:k]
	#for i in range(3):
	#	x, y = map(int, input().split())
	#	points.append((x, y))
	#s = input()
	#if happy_trio(x, y, z, a, b, c):
	#	print("YES")
	#else:
	#	print("NO")
	find_best(n, a)
	#print(count_eggs(n, s, l))

x = input()
inp  = input().split(" ")
chest = 0
back = 2
biceps = 1
count = [0, 0, 0]
for i in range(len(inp)):
    if i==chest:
        count[0]+=int(inp[chest])
        chest+=3
    if i==biceps:
        count[1]+=int(inp[biceps])
        biceps+=3
    if i==back:
        count[2]+=int(inp[back])
        back+=3
maxVal = max(count)
if count[0]==maxVal:
    print("chest")
elif count[1]==maxVal:
    print("biceps")
else:
    print("back")

n=int(input())
mat=list(map(int,input().split()))
exe=['chest','biceps','back']
arr=[0,0,0]
i=0
while(n>0):
    n-=3
    try:
        arr[i%3]+=mat[i]
        arr[(i+1)%3]+=mat[i+1]
        arr[(i+2)%3]+=mat[i+2]
    except:
        break
    i+=3
ind=arr.index(max(arr))
print(exe[ind])

n = int(raw_input())
a = map(int,raw_input().split())
x = [sum(a[::3]),sum(a[1::3]),sum(a[2::3])]
if x.index(max(x))==0:
	print "chest"
elif x.index(max(x))==1:
	print "biceps"
else:
	print "back"

a = int(input())
l = list(map(int, input().split()))
x, y, z = 0, 0, 0

for i in range(1,a+1):
    if i % 3 == 1:
        x += l[i-1]
    elif i % 3 == 2:
        y += l[i-1]
    else:
        z += l[i-1]

p = max(x, y, z)

if p == x:
    print("chest")
elif p == y:
    print("biceps")
else:
    print("back")

n=input()
e=map(int, raw_input().split())
r=[0,0,0]
for i in range(n):
    r[i%3]+=e[i]
print ['chest', 'biceps', 'back'][r.index(max(r))]

n=int(input())
a=list(map(int,input().split()))
c,bi,b=0,0,0
i=0
for i in range(0,n,i+3):
    if i<n:
        c+=a[i]
    if i+1<n:
        bi+=a[i+1]
    if i+2<n:
        b+=a[i+2]

if c==max(c,bi,b):
    print("chest")
elif bi==max(c,bi,b):
    print("biceps")
elif b==max(c,bi,b):
    print("back")

n=int(raw_input())
k=raw_input().split()
a=[0,0,0]
for i in range(n): a[i%3]+=int(k[i])
m=max(a)
if(m==a[0]): print("chest")
elif(m==a[1]): print("biceps")
else: print("back")

n = int(input())
s = [int(i) for i in input().split()]
c = 0
b = 0
ba = 0

for i in range(0,n,3):
	c+=s[i]
for i in range(1,n,3):
	b+=s[i]

for i in range(2,n,3):
	ba+=s[i]

if c>b and c>ba:
	print("chest")
elif b>ba and b>c :
	print("biceps")
else:
	print("back")

n=int(input())
a=list(map(int, input().split()))
b=["chest","biceps","back"]
if len(a)<=3:
    print(b[a.index(max(a))])
else:
    i=0
    j=0
    k=0
    for _ in range(len(a)):
        if _%3==0:
            i+=a[_]
        elif _%3==1:
            j+=a[_]
        else:
            k+=a[_]
    if i==max(i,j,k):
        print("chest")
    elif j==max(i,j,k):
        print("biceps")
    else:
        print("back")

t = int(input())
l = list(map(int, input().split()))
chest = 0
bicep = 0
back = 0

for i in range(1, len(l)+1):
    if(i%3==1):
        chest+=l[i-1]
    elif(i%3==2):
        bicep+=l[i-1]
    else:
        back+=l[i-1]

m = max(chest, bicep, back)
if(m==back):
    print("back")
elif(m==chest):
    print("chest")
else:
    print("biceps")

#-------------Program-------------
#----KuzlyaevNikita-Codeforces----
#

g=0;b=0;s=0
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    if i%3==0:g+=a[i]
    elif i%3==1:b+=a[i]
    else:
        s+=a[i]
k=max(g,b,s)
if g==k:print('chest')
elif b==k:print('biceps')
else:
    print('back')

import sys

n = input()
a = b = c = 0
wts = map(int, sys.stdin.readline().split())
a = sum(wts[::3])
if len(wts) > 1:
    b = sum(wts[1::3])
if len(wts) > 2:
    c = sum(wts[2::3])
if a > b:
    if a > c:
        print "chest"
    else:
        print "back"
else:
    if b > c:
        print "biceps"
    else:
        print "back"

n=int(input())
l=list(map(int,input().split()))
x=y=z=0
t=n%3
for i in range(0,n-t,3):
    x+=l[i]
    y+=l[i+1]
    z+=l[i+2]
if(t==1):
    x+=l[n-1]
elif(t==2):
    x+=l[n-2]
    y+=l[n-1]
if(x>=y and x>=z):
    print("chest")
elif(y>=x and y>=z):
    print("biceps")
else:
    print("back")

#!/usr/bin/python

n =  int(raw_input())
a = []

a = map(int,raw_input().split())

chest = sum(a[0:n:3])
biceps = sum(a[1:n:3])
back = sum(a[2:n:3])

if max(chest,biceps,back) == chest:
        print "chest"
elif max(chest,biceps,back) == biceps:
        print "biceps"
else:
        print "back"

def solution():
    num = int(input())
    li = list(map(int, input().split()))
    chest = 0
    biceps = 0
    back = 0
    checker = []
    for i in range(num):
        if len(checker) == 0:
            chest += li[i]
            checker.append('c')
        elif checker[-1] == 'c':
            biceps += li[i]
            checker.append('b')
        elif checker[-1] == 'b':
            back += li[i]
            checker.append('ba')
        elif checker[-1] == 'ba':
            chest += li[i]
            checker.append('c')
    if chest > biceps and chest > back:
        return print('chest')
    elif biceps > chest and biceps > back:
        return print('biceps')
    else:
        return print('back')
solution()

#!/usr/bin/env python
n = int(raw_input().split()[0])

l = map(int, raw_input().split())
a=0;b=0;c=0
for i in xrange(len(l)):
	x = i%3
	if x==0:
		a+=l[i]
	elif x==1:
		b+=l[i]
	else:
		c+=l[i]
if a>b and a>c:
	print "chest"
elif b>a and b>c:
	print "biceps"
else:
	print "back"

z = int(raw_input())
x = map(int, raw_input().split())
a = 0
b = 0
c = 0
for i in range(z):
	cur = x[i]
	if i % 3 == 0:
		a += cur
	elif i % 3 == 1:
		b += cur
	else:
		c += cur

if a > b and a > c:
	print("chest")
elif b > a and b > c:
	print("biceps")
elif c > a and c > b:
	print("back")

input()
s = map(int,raw_input().split())
a = sum(s[0::3])
b = sum(s[1::3])
c = sum(s[2::3])
d= [a,b,c]
f = ['chest','biceps','back']
print f[d.index(max(d))]

n = int(input())
s = list(map(int, input().split()))
chest = 0
biceps = 0
back = 0
for i in range(len(s)):
    if i % 3 == 0:
        chest += s[i]
    elif i % 3 == 1:
        biceps += s[i]
    else:
        back += s[i]
if max(chest, biceps, back) == chest:
    print('chest')
elif max(chest, biceps, back) == biceps:
    print('biceps')
else:
    print('back')

n = int(raw_input())
a = map(int, raw_input().split())
#a.append(0)
#a.append(0)
#a.append(0)
c = 0
bc = 0
bk = 0
for i in range(n):
    if i%3==0:
        c+=a[i]
    elif i%3==1:
        bc+=a[i]
    else:
        bk+=a[i]
if c==max(c,bc,bk):
    print "chest"
else:
    print ["biceps","back"][bk==max(c,bc,bk)]

n = input()
k = map(int,raw_input().split(' '))
m = [0,0,0]
for i in range(len(k)):
	m[i%3] += k[i]
j=m.index(max(m))
if j == 0:
	print 'chest'
elif j == 1:
	print 'biceps'
else:
	print 'back'

# cf 255 A 800
n = int(input())
A = [*map(int, input().split())]
c, bi, ba = 0, 0, 0

for i in range(len(A)):
    if i % 3 == 0:
        c += A[i % n]
    elif i % 3 == 1:
        bi += A[i % n]
    elif i % 3 == 2:
        ba += A[i % n]

if c > bi and c > ba:
    print("chest")
elif bi > c and bi > ba:
    print("biceps")
elif ba > c and ba > bi:
    print("back")

input()
l=map(int,raw_input().split())
a,b,c=sum(l[::3]),sum(l[1::3]),sum(l[2::3])
if a>b:
 if a>c:
  print 'chest'
  exit()
 print 'back'
 exit()
if b>c:
 print 'biceps'
 exit()
print 'back'

n=input()
lst=map(int,raw_input().split())

chest=0
biceps=0
back=0
for i in range(1,n+1):
    if i%3==1:
        chest+=lst[i-1]
    elif i%3==2:
        biceps+=lst[i-1]

    else:
        back+=lst[i-1]

maxnum=max(chest,biceps,back)
if chest==maxnum:
    print "chest"
elif biceps==maxnum:
    print "biceps"
else:
    print "back"

import sys
import math as m
def main():
    pass
def binary(n):
    #decimal to binary
    return (bin(n).replace("0b", ""))
def decimal(s):
    #binary to decimal
    return (int(s, 2))
def pow2(n):
    #power of a number base 2
    p = 0
    while n > 1:
        n //= 2
        p += 1
    return (p)
def isPrime(n):
    # if  number is prime in √n time
    if (n == 1):
        return (False)
    else:
        root = int(n ** 0.5)
        root += 1
        for i in range(2, root):
            if (n % i == 0):
                return (False)
        return (True)
def lts(l):
    #list to string ,no spaces
    s=''.join(map(str,l))
    return s
def stl(s):
    #for each character in string to list with no spaces -->
    l=list(s)
    #for space in string  -->
    #l=list(s.split(" "))
    return l
#1000000007
mod=int(1e9)+7
def sinp(): return sys.stdin.readline().strip()
def iinp(): return int(input())
def ninp(): return map(int, sys.stdin.readline().strip().split())
def linp(): return list(map(int, sys.stdin.readline().strip().split()))
def p(a): print(a)
def p2(a,b):print(a,b)
#for _ in range(iinp()):
n=iinp()
a=linp()
chest=a[0::3]
c1=sum(chest)
biceps=a[1::3]
b1=sum(biceps)
back=a[2::3]
bs=sum(back)
if(max(c1,b1,bs)==c1):
    print("chest")
elif(max(c1,b1,bs)==b1):
    print("biceps")
elif(max(c1,b1,bs)==bs):
    print("back")

import sys
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))#might need to remove the -1
def invr():
    return(map(int,input().split()))

n = inp()
s = inlt()
i = 1
chest, biceps, back = 0, 0, 0
for j in range(n):
    if i == 1:
        chest += s[j]
        i += 1
    elif i == 2:
        biceps += s[j]
        i += 1
    else:
        back += s[j]
        i = 1
w = max(chest, biceps, back)
if w == chest:
    print('chest')
elif w == biceps:
    print('biceps')
else:
    print('back')

t=input()
n=map(int,raw_input().split())
flag=0
c=0
bi=0
b=0
for i in xrange(t):
    if(flag==0):
        c+=n[i]
        flag=1
    elif(flag==1):
        bi+=n[i]
        flag=2
    else:
        b+=n[i]
        flag=0

if(c>bi and c>b):
    print "chest"
else:
    if(bi>b):
        print "biceps"
    else:
        print "back"

n = int(input())
a = list(map(int, input().split()))
chest = sum(a[0::3])
biceps = sum(a[1::3])
back = sum(a[2::3])
if chest == max(chest, biceps, back):
	i = 0
elif biceps == max(chest, biceps, back):
	i = 1
else:
	i = 2
print(['chest','biceps','back'][i])

nexs = int(raw_input())
counts = [0, 0, 0]
exs = map(int, raw_input().split())
for i, ex in enumerate(exs):
  counts[i % 3] += ex
if counts[0] == max(counts):
  print "chest"
elif counts[1] == max(counts):
  print "biceps"
else:
  print "back"

n = int(input())
a = list(map(int, input().split()))
biceps = back = chest = 0
for i in range(n):
	if i%3==0:
		chest+=a[i]
	elif i%3==1:
		biceps+=a[i]
	else:
		back+=a[i]
if max(max(chest, biceps), back) == chest:
	print("chest")
elif max(max(chest, biceps), back) == biceps:
	print("biceps")
else:
	print("back")

n = int(raw_input())
a = map(int, raw_input().split())
muscle = [0,0,0]

for i in range(n):
	muscle[i % 3] += a[i]

if int(muscle[0]) == int(max(muscle)):
	print "chest"
elif int(muscle[1]) == int(max(muscle)):
	print "biceps"
elif int(muscle[2]) == int(max(muscle)):
	print "back"

n=int(input())
a,sum1,sum2,sum3=[],0,0,0
x=raw_input()
a=x.split()
for i in range(n):
    if((i+1)%3==1):
        sum1 = sum1+int(a[i])
    elif((i+1)%3==2):
        sum2 = sum2+int(a[i])
    else:
        sum3 = sum3+int(a[i])
if((sum1 > sum2) & (sum1 > sum3)):
    print("chest")
elif(sum2 > sum3):
    print("biceps")
else:
    print("back")

n = input()
exe = map(int,raw_input().split())
chest=0
biseps = 0
back = 0
for i in range(n):
    if i == 0 or i%3 == 0:
        chest+= exe[i]
    elif i%3 == 1:
        biseps+= exe[i]
    else:
        back+= exe[i]
if chest == max(chest,biseps,back):
    print "chest"
elif back == max(chest,back,biseps):
    print "back"
else :
    print "biceps"

# import sys
# sys.stdin=open("input.in","r")
# sys.stdout=open("output.out","w")

n = int(input())
l = list(map(int,input().split()))
d = {sum(l[0::3]):"chest",sum(l[1::3]):"biceps",sum(l[2::3]):"back"}
print(d[max(sum(l[0::3]),sum(l[1::3]),sum(l[2::3]))])

n = int(raw_input())
l = map(int, raw_input().split())

somas = [0] * 3

for i in xrange(n):
	somas[i % 3] += l[i]

maior = max(somas)
if somas[0] == maior: print 'chest'
elif somas[1] == maior: print 'biceps'
else: print 'back'

input()
a=map(int,raw_input().split())
print max((sum(a[::3]),'chest'),(sum(a[1::3]),'biceps'),(sum(a[2::3]),'back'))[1]

N=int(input())
A=list(map(int,raw_input().split()))
count1=0
count2=0
count3=0
for k in range (N):
    if(k%3==0):
        count1+=A[k]
    else:
        if(k%3==1):
            count2+=A[k]
        else:
            count3+=A[k]
if((count1>count2)and (count1>count3)):
    print("chest")
if((count2>count1)and (count2>count3)):
    print("biceps")
if((count3>count2)and (count3>count1)):
    print("back")

n = int(input())
a = list(map(int,input().split()))
from collections import defaultdict
d = defaultdict(list)
for i in range(0,len(a)):
    m = i%3
    d[m].append(a[i])
d = dict(d)
x = max(d.items(),key=lambda x:sum(x[1]))[0]
if x == 0:
    print("chest")
elif x == 1:
    print("biceps")
elif x == 2:
    print("back")

n = int(input())
a = list(map(int,input().split()))
counta=0
countb=0
countc=0
for i in range(0,n,3):
    counta+=a[i]
for i in range(1,n,3):
    countb+=a[i]
for i in range(2,n,3):
    countc+=a[i]
ans = max(counta,countb,countc)
if ans==counta:
    print("chest")
elif ans==countb:
    print("biceps")
elif ans==countc:
    print("back")

n = input()
a = map(int, raw_input().split())
arr = ['chest','biceps','back']
x = 0
y = 0
z = 0
i = 0
while i<n:
    if i%3==0:
        x+=a[i]
    elif i%3==1:
        y+=a[i]
    else:
        z+=a[i]
    i+=1

z = [x,y,z]

k = z.index(max(z))
print arr[k]

input()
l=map(int,raw_input().split())
print["chest","biceps","back"][max(0,1,2,key=lambda i:sum(l[i::3]))]

n = int(input())
a = list(map(int, input().split()))
x, y, z = 0, 0, 0
if n % 3 == 1:
    a.append(0)
    a.append(0)
    n += 2
if n % 3 == 2:
    a.append(0)
    n += 1
for i in range(0, n, 3):
    x, y, z = x + a[i], y + a[i + 1], z + a[i + 2]
if x > y and x > z:
    print('chest')
elif y > x and y > z:
    print('biceps')
else:
    print('back')

n=int(raw_input())
workout=map(int,raw_input().split())
chest=biceps=back=0
for i in range(n):
    if(i%3==0):
        chest=chest+workout[i]
    if(i%3==1):
        biceps=biceps+workout[i]
    if(i%3==2):
        back=back +workout[i]
val=max(chest,biceps,back)
print "chest" if chest==val else 'back' if back==val else 'biceps'

n = input()
a = map(int, raw_input().split())
chest = sum(a[::3])
biceps = sum(a[1::3])
back = sum(a[2::3])
m = max(chest, biceps, back)
if m == chest:
    print 'chest'
elif m == biceps:
    print 'biceps'
else:
    print 'back'

n = int(input())
l = list(map(int, input().split()))

count = [0] * 3
_max = 0
_max_idx = 0
for i, v in enumerate(l):
    idx = i % 3
    count[idx] += v
    if count[idx] > _max:
        _max = count[idx]
        _max_idx = idx
print(['chest', 'biceps', 'back'][_max_idx])

n = input()
l1 = map(int, raw_input().split())
chest = 0
biceps = 0
back = 0
for i in range(0, n):
    if i % 3 == 0:
        chest += l1[i]
    elif i % 3 == 1:
        biceps += l1[i]
    else:
        back += l1[i]
l = [chest, biceps, back]
if max(l) == chest:
    print "chest"
elif max(l) == biceps:
    print "biceps"
elif max(l) == back:
    print "back"

n = input()
a = map(int, raw_input().split(" "))
result = {
	"chest": 0,
	"biceps": 0,
	"back":0
}
for i in range(0,n,3):
	result["chest"] += a[i]
for i in range(1,n,3):
	result["biceps"] += a[i]
for i in range(2,n,3):
	result["back"] += a[i]

part = "chest"
max_reps = result["chest"]
for k,v in result.iteritems():
	if v > max_reps:
		max_reps = v
		part = k
print part

__author__ = 'a11x256'
n = int(raw_input())
x = map(int , raw_input().split())
a = [0] * 3
for i in xrange(n):
    a[i%3] += x[i]

if (a[0] >max(a[1],a[2])):
    print "chest"
elif (a[1] > max(a[0],a[2])):
    print "biceps"
else:
    print "back"

n,a = input(),map(int,raw_input().split())
a = [sum(a[i::3]) for i in range(3)]
print ["chest","biceps","back"][a.index(max(a))]

    # n, a = input(), map(int, raw_input().split())
    # a = [sum(a[i::3]) for i in [0, 1, 2]]
    # print["chest", "biceps", "back"][a.index(max(a))]

n = int(raw_input())
a = map(int, raw_input().split())

c, b, bk = 0, 0, 0
for i in range(len(a)):
    if i % 3 == 0:
        c += a[i]
    elif i % 3 == 1:
        b += a[i]
    else:
        bk += a[i]

if c > b:
    if c > bk:
        print "chest"
    else:
        print "back"
elif b > bk:
    print "biceps"
else:
    print "back"

n=int(input())
j=n+1
a=[0]*n
a=list(map(int,input().split()))
bi=0
ba=0
ch=0
if n==1:
    ch=ch+a[0]
elif n==2:
    ch=ch+a[0]
    bi=bi+a[1]
else:
    j=0
    for i in range(0,int(n/3)):
        ch=ch+a[j]
        bi=bi+a[j+1]
        ba=ba+a[j+2]
        j=j+3
    t=n%3
    if t==1:
        ch=ch+a[n-t]
    elif t==2:
        ch=ch+a[n-t]
        bi=bi+a[n-t+1]
if ch>=bi:
    if ch>=ba:
        print("chest")
    else:
        print("back")
elif bi>=ba:
    print("biceps")
else:
    print("back")

def solve(exercises):

    chest = sum(exercises[0::3])
    biceps = sum(exercises[1::3])
    back = sum(exercises[2::3])

    maxExercise = "chest"

    if biceps > chest and biceps > back:
        maxExercise = "biceps"
    elif back > chest and back > biceps:
        maxExercise = "back"

    return maxExercise

n = int(input())
exercises = list(map(int, input().split(" ")))

print(solve(exercises))

n = int(input())
a = list(map(int,input().split()))
chest = []
biceps = []
back = []
c = 0
for i in range(len(a)):
    if c%3==0:
        chest.append(a[i])
        c+=1
    elif c%3==1:
        biceps.append(a[i])
        c+=1
    elif c%3==2:
        back.append(a[i])
        c+=1
q = sum(chest)
w = sum(biceps)
e = sum(back)
if q>w and q>e:
    print("chest")
elif w>q and w>e:
    print("biceps")
else:
    print("back")

n = int(input())
a = map(int, input().split())
x = list(a)
b = 0
chest = x[::3]
biceps = x[1::3]
back = x[2::3]
ch = sum(chest)
bi = sum(biceps)
ba = sum(back)
if ch >= bi:
    if ch >= ba:
        print('chest')
    else:
        print('back')
elif bi >= ch:
    if bi >= ba:
        print('biceps')
    else:
        print('back')

n=int(input())
a=list(map(int,input().split()))
g=0
b=0
s=0
count=0
for i in a:
    count+=1
    if count>3:
         count=1
    if count==1:
        g=g+i
    if count==2:
        b=b+i
    if count==3:
        s=s+i
if max(g,b,s)==g:
    print('chest')
else:
    if max(g,b,s)==b:
        print('biceps')
    else:
        print('back')

n=int(input())
arr=list(map(int,input().split()))
m={1:0,2:0,3:0}
for i in range(n):
    m[(i%3)+1]+=arr[i]

# for i in arr:
#     if i==1:
#         m[1]+=1
#     if i==2:
#         m[1]+=1
#         m[2]+=1
k=[1,2,3]
v=list(m.values())
# print(m,v,max(v),v.index(max(v)),k[v.index(max(v))])
# print(v,max(v))
if k[v.index(max(v))]==1:
    print("chest")
elif k[v.index(max(v))]==2:
    print("biceps")
else:
    print("back")

# n=int(input())
# arr=list(map(int,input().split()))
# for i in range(n):
#     arr[i]=arr[i]%3
# m={1:0,2:0,3:0}
# for i in arr:
#     if i==0:
#         m[i]+=1
#     if i==1:
#         m[i]+=1
#         m[0]+=1
#     # if
# v=list(m.values())
# # print(m)
# if v.index(max(v))==0:
#     print("chest")
# elif v.index(max(v))==2:
#     print("biceps")
# else:
#     print("back")

# n=int(input())
# arr=list(map(int,input().split()))
# for i in range(n):
#     arr[i]=arr[i]%3
# m={1:0,2:0,3:0}
# for i in arr:
#     if i==1:
#         m[1]+=1
#     if i==2:
#         m[1]+=1
#         m[2]+=1
# k=[1,2,3]
# v=list(m.values())
# print(m,v,max(v),v.index(max(v)),k[v.index(max(v))])
# print(v,max(v))
# if k[v.index(max(v))]==1:
#     print("chest")
# elif k[v.index(max(v))]==2:
#     print("biceps")
# else:
#     print("back")

# # n=int(input())
# # arr=list(map(int,input().split()))
# # for i in range(n):
# #     arr[i]=arr[i]%3
# # m={1:0,2:0,3:0}
# # for i in arr:
# #     if i==0:
# #         m[i]+=1
# #     if i==1:
# #         m[i]+=1
# #         m[0]+=1
# #     # if
# # v=list(m.values())
# # # print(m)
# # if v.index(max(v))==0:
# #     print("chest")
# # elif v.index(max(v))==2:
# #     print("biceps")
# # else:
# #     print("back")

n = int (input ())
a = list (map (int, input ().split ()))

chest = []
biceps = []
back = []

for i in range (1,n+1):
	if i%3 == 1:
		chest.append (a[i-1])
	elif i%3 == 2:
		biceps.append (a[i-1])
	else:
		back.append (a[i-1])

x = sum (chest)
y = sum (biceps)
z = sum (back)

if max (x,y,z) == x:
	print ('chest')
elif max (x,y,z) == y:
	print ('biceps')
else:
	print ('back')

t = int(input())
x = list(map(int, input().split()))
ind = x.index(max(x))+1
if (ind%3==1):
	print ("chest")
elif (ind%3==2):
	print ("biceps")
elif ind%3==0:
	print ("back")

n=int(input())
lst=list(map(int,input().split()))
if n%3==1:
    print("chest")
elif n%3==2:
    print("biceps")
elif n%3==0:
    print("back")

n=int(raw_input())

exercises=raw_input().split()
chest=0
back=0
biceps=0

for i in range(1,n+1):
    if i%2==0:
        biceps += int(exercises[i-1])
    elif i%3==0:
        back += int(exercises[i-1])
    else:
        chest += int(exercises[i-1])

if chest > biceps and chest > back:
    print 'chest'

if back > biceps and back > chest:
    print 'back'

if biceps > chest and biceps > back:
    print 'biceps'

# Greg's Workout
def workout(arr):
    chest = 0
    biceps = 0
    back = 0
    flag = 1
    for i in arr:
        if flag == 1:
            chest += i
            flag +=1
        elif flag == 2:
            biceps += i
            flag += 1
        elif flag == 3:
            back += i
            flag = 0
    big = max(chest, biceps, back)
    if chest == big:
        return "chest"
    elif biceps == big:
        return 'biceps'
    return 'back'

n = int(input())
ar = list(map(int, input().rstrip().split()))
print(workout(ar))

# import sys
# sys.stdin=open("input.in","r")
# sys.stdout=open("output.out","w")

a=int(input())
b=list(map(int,input().split()))
chest,biceps,back=0,0,0
for x in range(int(a/3)):
	chest+=b[x]
	biceps+=b[x+1]
	back+=b[x+2]
if a%3==2:
	chest+=b[-2]
	biceps+=b[-1]
elif a%3==1:
	chest+=b[-1]
m=[chest,biceps,back]
if max(m)==m[0]:
	print('chest')
elif max(m)==m[1]:
	print('biceps')
elif max(m)==m[2]:
	print('back')

n=int(input())
nums=list(map(int,input().split()))
chest=0
biceps=0
back=0
for i in range(1,len(nums)+1):
    if i%3==1:
        chest=chest+nums[i-1]
    elif i%3==2:
        biceps=biceps+nums[i-1]
    elif i%3==0:
        back=back+nums[i-1]
if chest>biceps and chest>back:
    print("chest")
elif biceps>chest and biceps>chest:
    print("biceps")
elif back>chest and back>biceps:
    print("back")

t = int(input())
a = list(map(int, input().split()))[:t]

m = max(a)
for i in range(t):
    if a[i] == m:
        break
if i<=3:
    if (i + 1) == 1:
        print("chest")
    elif (i + 1)== 2:
        print("biceps")
    elif (i + 1)== 3:
        print("Back")
else:
    if (i + 1) // (3) == 1:
        print("chest")
    elif (i + 1) // (3) == 2:
        print("biceps")
    elif (i + 1) // (3) == 3:
        print("Back")

a = int(input())
x = list(map(int,input().split()))
chest = []
biceps= []
back=[]
chest.append(x[0::3])
biceps.append(x[1::3])
back.append(x[2::3])

if sum(*biceps)<sum(*chest)> sum(*back):
    print('chest')
elif sum(*chest)<sum(*back)>sum(*chest):
    print('back')
elif sum(*chest) < sum(*biceps) > sum(*chest):

    print('biceps')
    # print(sum(*chest), sum(*biceps),sum(*back))

n = int(input())
a = list(map(int, input().split()))
chest = 0
biceps = 0
back = 0
for i in range(0, len(a), 3):
    chest += a[i]
for i in range(1, len(a), 3):
    biceps += a[i]
for i in range(2, len(a), 3):
    back += a[i]
if back < chest > biceps:
    print(chest)
elif chest < back > biceps:
    print(back)
else:
    print(biceps)

n=int(input())
exercicios=input().split(" ")
biceps=0
back=0
chest=0
for x in range(0,n,3):
	chest+=int(exercicios[x])
for x in range(1,n,3):
	biceps+=int(exercicios[x])
for x in range(2,n,3):
	back+=int(exercicios[x])
lista=[chest,back,biceps]
y=sorted(lista)
if(lista[2]==chest):
  print("chest")
if(lista[2]==biceps):
  print("biceps")
else:
  print("back")

n = int(input())

arr = list(map(int, input().split()))

i = 1
chest, bicep, back = 0, 0, 0

for x in arr:
	if i == 1:
		chest += x
		i += 1
	elif i == 2:
		bicep += x
		i += 1
	elif i == 3:
		back += x
		i += 1
	if i > 3:
		i = 1

if chest >= bicep >= back:
	print("chest")
elif bicep >= chest >= back:
	print("biceps")
else:
	print("back")

n=int(input())
l=list(map(int,input().split()))
m=max(l)
index=l.index(m)+1
if index%3==0:
    print("back")
elif index%2==0:
    print("biceps")
else:
    print("chest")

def check(l):
    chest = 0
    biceps = 0
    back = 0
    for i in range(0,2):
        if len(l) % 3 == 0:
            break
        l.append(0)

    for i in range(0,len(l)//3,3):
        chest += l[i]
        biceps += l[i+1]
        back +=l[i+2]

    if chest > biceps and chest > back:
        return 'chest'
    elif biceps > chest and biceps > back:
        return 'biceps'
    else:
        return 'back'

t = int(input())
a = input().split()
b = map(int, a)
i_list = list(b)
print(check(i_list))

n= int(input())
x = list(map(int, input().split()))
chests=0
biceps=0
backs=0
for e in range(0,n,3):
  chests=chests+x[e]
for e1 in range(1,n,3):
  biceps=biceps+x[e1]
for e2 in range(2,n,3):
  backs=backs+x[e2]
if chests > backs:
  if chests> biceps:
    print("chest")
elif backs > chests:
  if backs > biceps:
    print("back")
elif biceps > backs:
  if biceps > chests:
    print("biceps")

a=int(input())
l=list(map(int,input().split()))
ch=0
bic=0
bac=0
count=1
for i in range(a):
    if count%3==0:
        bac+=l[i]
    elif count%2==0:
        bic+=l[i]
    else:
        ch+=l[i]
    count+=1
    if count==4:
        count=1
print(ch,bic,bac)
e=max([bac,bic,ch])
if e==bac:
    print('back')
elif e==bic:
    print('biceps')
else:
    print('chest')

n=input();l=map(int,raw_input().split())
d={'biceps':0,'chest':0,'back':0}
for i in range(n):
    if (i+1)%3==0:  d['back']+=l[i]
    elif (i+1)%2==0:    d['biceps']+=l[i]
    else:   d['chest']+=l[i]
for i in d:
    if d[i]==max(d.values()):
        print i
        break

import sys
n = input()
arr = map(int,sys.stdin.readline().split())
i = 1
chest = 0
back = 0
biceps = 0
while(i <= n):
    if(i%2 == 0):
        biceps += arr[i-1]
    elif(i%3 == 0):
        back += arr[i-1]
    else:
        chest += arr[i-1]
    i += 1
list = [chest,biceps,back]
c = list.index(max(list))
if(c == 0):
    print "chest"
elif(c == 1):
    print "biceps"
else:
    print "back"

n = int(input())
days = [int(n) for n in input().split()]
chest = 0
biceps = 0
back = 0
for i in range(n):
  if i%3 == 0:
    chest += 1
  elif i%3 == 1:
    biceps += 1
  else:
    back += 1
if chest > biceps and chest > back:
  print("chest")
elif biceps > chest and biceps > back:
  print("biceps")
else:
  print("back")

n = int(input())
a = list(map(int, input().split()))[:n]

ch = sum(a[0::3])
bc = sum(a[1::3])
bk = sum(a[2::3])

w = [ch, bk, bc]
if w[2]==bk:
    print("back")
elif w[2]==bc:
    print("bicepts")
else:
    print("chest")

n=int(input())
a=list(map(int,input().split()))
c=[]
x=["chest","bicep","back"]
for i in range(3):
    c.append(sum(a[i::3]))
mapped=zip(x,c)
print(sorted(list((mapped)))[-1][0])

n=int(input())
repeats=[int(i) for i in input().split()]
exercises=["chest","biceps","back"]
total=[0,0,0]
for i in range(n):
    if i in range(0, n, 3):
        total[0]+=1
    if i in range(1, n, 3):
        total[1]+=1
    if i in range(2, n, 3):
        total[2]+=1
solution=exercises[total.index(max(total))]
print(solution)

a = int(input())
x = list(map(int,input().split()))
chest = []
biceps= []
back=[]
chest.append(x[0::3])
biceps.append(x[1::3])
back.append(x[2::3])

if sum(*biceps)<sum(*chest)> sum(*back):
    print('chest')
elif sum(*chest)<sum(*back)>sum(*chest):
    print('back')
else:
    print('biceps')
    # print(sum(*chest), sum(*biceps),sum(*back))

n = int(input())
x = [int(i) for i in input().split()]

chest = 0
bicep = 0
back = 0

for i in range(n):
    if i%3 == 0:
        chest += x[i]
    elif i%3 == 1:
        bicep+= x[i]
    elif i%3 == 2:
        back += x[i]

y = [chest,bicep, back]
m = max(y)

if( m == chest):
    print("chest")
elif m == bicep:
    print("bicep")
elif m == back:
    print("back")

n = int(input())

k = list(map(int,input().split()))
count1 = 0
count2 = 0
count3 = 0
temp = 0
max = 0
for i in range(len(k)):

    if i%3 == 0:
        count1+=k[i]
        if count1 > max:
            temp = 'chest'

    elif i!=0 and i%2==0:
        count3+=k[i]
        if count3 > max:
            temp = 'back'
    else:
        count2+=k[i]
        if count2 > max:
            temp = 'biceps'

print(temp)

a = int(input())
x = list(map(int,input().split()))
chest = []
biceps= []
back=[]
chest.append(x[0::3])
biceps.append(x[1::3])
back.append(x[2::3])

if sum(*biceps)<sum(*chest)> sum(*back):
    print('chest')

elif sum(*chest) < sum(*biceps) > sum(*chest):
    print('biceps')
elif sum(*chest) < sum(*back) > sum(*chest):
    print('back')
    # print(sum(*chest), sum(*biceps),sum(*back))

n = int(input())
num = input()
a = []

def get_the_data(count, num, arr):
    for i in range(0, len(num)):
        if num[i] == ' ':
            arr.append(int(num[count:i]))
            count = i+1
        elif i == len(num)-1:
            arr.append(int(num[count:len(num)]))
    return arr

arr = get_the_data(0, num,  a)
chest = 0
bicep = 0
back = 0
i = 1
while i <= n:
    if i % 3 == 0:
        back += arr[i-1]
    elif i % 2 == 0:
        bicep += arr[i-1]
    else:
        chest += arr[i-1]
    i += 1

if chest >back and chest > bicep:
    print('chest')
elif bicep > chest and bicep > back:
    print('biceps')
else:
    print('back')

##n=int(input())
##a=list(map(int,input().split()))
##count=1
##c=0 #chest
##f=0 #biceps
##h=0 #back
##for i in range(len(a)):
##    if count==1:
##        c+=a[i]
##        count+=1
##    elif
##
##
##
##    print('i',i,'i+1',i+1,'ai',a[i],'c',c,'f',f,'h',h)
##
##if h<c>f:
##    print('chest')
##elif h<f>c:
##    print('biceps')
##else:
##    print('back')

n= int(input())
a = list(map(int, input().split()))
count=1
chest,biceps,back=0,0,0
for i in range(len(a)):
    if count==1:
        chest+=a[i]
        count+=1
    elif count==2:
        biceps+=a[i]
        count += 1
    elif count==3:
        back+=a[i]
        count =1
if  chest > biceps > back:
    print('chest')
if  biceps > chest > back:
    print('biceps')
if  back > chest > biceps:
    print('back')

n=int(input())
a=list(map(int,input().split()))
g=0
b=0
s=0
count=0
for i in a:
    count+=1
    if count==1:
        g=g+i
    if count==2:
        b=b+i
    if count==3:
        s=s+i
    if count>3:
         count=1
if max(g,b,s)==g:
    print('chest')
else:
    if max(g,b,s)==b:
        print('biceps')
    else:
        print('back')

n=input();l=map(int,raw_input().split())
d={'biceps':0,'chest':0,'back':0}
for i in range(n):
    if (i+1)%3==0:  d['back']+=1
    elif (i+1)%2==0:    d['biceps']+=1
    else:   d['chest']+=1
for i in d:
    if d[i]==max(d.values()):
        print i
        break

'''
Amirhossein Alimirzaei
Telegram : @HajLorenzo
Instagram : amirhossein_alimirzaei
University of Bojnourd
'''

input()
tmp=list(map(int,input().split()))
C=[0,0,0]
i=0
for _ in tmp:
    C[i]+=_
    i+=1
    if i==3:
        i=0
print(C)
print(["chest","biceps","back"][C.index(max(C))])

n = int(input())
a = list(map(int, input().split()))
if len(a) % 2 == 0:
    print('biceps')
elif len(a) % 3 == 0:
    print('back')
else:
    print('chest')

t = int(input())
x = list(map(int, input().split()))
ind = x.index(max(x))+1
if (ind%3==1 or ind%3==0):
	print ("chest")
elif (ind%3==2):
	print ("biceps")
else:
	print ("back")

n = int(input())

k = list(map(int,input().split()))
count1 = 0
count2 = 0
count3 = 0
max = 0
temp = 0
for i in range(0,len(k),3):
    count1+=1
    if count1>max:
        max = count1
        temp = 'ches'

for i in range(1,len(k),3):
    count2+=1
    if count2>max:
        max = count2
        temp = 'biceps'

for i in range(2,len(k),3):
    count3+=1
    if count3>max:
        max = count3
        temp = 'back'

print(temp)

n = int(input())
l = list(map(int, input().split()))

count = [0] * 3
_max = 0
_max_idx = 0
for i, v in enumerate(l):
    idx = i % 3
    count[idx] += v
    if count[idx] > _max:
        _max = count[idx]
        _max_idx = idx
print(['chest', 'bicepts', 'back'][_max_idx])

n = int(input())
a = list(map(int, input().split()))[:n]
c = 1
ch = 0
bc = 0
bk = 0
for i in a:
    if c%2==0:
        bc += i
        c +=1
    elif c%3==0:
        bk += i
        c += 1
    else:
        ch += i
        c += 1
w = [ch,bc,bk]
w.sort()
if w[2]==bk:
    print("back")
elif w[2]==bc:
    print("bicepts")
else:
    print("chest")

#!/usr/bin/env python
n = int(raw_input().split()[0])

l = map(int, raw_input().split())
a=0;b=0;c=0
for i in xrange(len(l)):
	x = i%3
	if x==0:
		a+=i
	elif x==1:
		b+=i
	else:
		c+=i
if a>b and a>c:
	print "chest"
elif b>a and b>c:
	print "biceps"
else:
	print "back"

n=int(input())
a=list(map(int, input().split()))
b=["chest","biceps","back"]
if len(a)<=3:
    print(b[a.index(max(a))])
else:
    i=0
    j=0
    k=0
    for _ in range(len(a)):
        if _%3==0:
            i+=1
        elif _%3==1:
            j+=1
        else:
            k+=1
    if i==max(i,j,k):
        print("chest")
    elif j==max(i,j,k):
        print("biceps")
    else:
        print("back")

a = int(input())
l = list(map(int, input().split()))
x, y, z = 0, 0, 0

for i in range(1,a+1):
    if i % 3 == 1:
        x += i
    elif i % 3 == 2:
        y += i
    else:
        z += i

if x > y and x > z:
    print("chest")
elif y > x and y > z:
    print("biceps")
else:
    print("back")

a=int(input())
b=list(map(int, input().split()))
ch=0
bi=0
ba=0

for i in range(1,len(b)+1):
  if i%2==0:
    bi+=b[i-1]
  elif i%3==0:
    ba+=b[i-1]
  else:
    ch+=b[i-1]
if (ch>bi and ch>ba):
  print("chest")
elif (bi>ch and bi>ba):
  print("biceps")
else:
  print("back")

n=int(input())
j=n+1
a=[1]*(n+1)
a=list(map(int,input().split()))
bi=0
ba=0
ch=0
if n==1:
    ch=ch+a[0]
elif n==2:
    ch=ch+a[0]
    bi=bi+a[1]
else:
    for i in range(0,int(n/3),3):
        ch=ch+a[i]
        bi=bi+a[i+1]
        ba=ba+a[i+2]
    t=n%3
    if t==1:
        ch=ch+a[i]
    elif t==2:
        ch=ch+a[i]
        bi=bi+a[i+1]
if bi>ba:
    if bi>ch:
        print("biceps")
    elif ch>bi:
        print("chest")
elif ba>ch:
    print("back")

n = int(input())
s = [int(i) for i in input().split()]
c = 0
b = 0
ba = 0

for i in range(0,n,3):
	c+=s[i]
for i in range(1,n,3):
	b+=s[i]

for i in range(2,n,3):
	ba+=1

print(c,b)
if c>b and c>ba:
	print("chest")
elif b>ba and b>c :
	print("biceps")
else:
	print("back")

n=int(input())
arr=list(map(int,input().split()))
for i in range(n):
    arr[i]=arr[i]%3
m={0:0,1:0,2:0}
for i in arr:
    m[i]+=1
v=list(m.values())
# print(m)
if v.index(max(v))==0:
    print("chest")
elif v.index(max(v))==2:
    print("biceps")
else:
    print("back")

n=int(input())
p=list(map(int,input().split()))
c=0
bic=0
back=0
if n==1:
	c+=p[0]
elif n==2:
	c+=p[0]
	bic+=p[1]
else:
	for i in range(0,n-2,3):
		c+=p[i]
		if i+1<n:
			bic+=p[i+1]
		if i+2<n:
			back+=p[i+2]
d={c:"chest",bic:"biceps",back:"back"}
print(d[max(c,bic,back)])

t=int(input())
a=list(map(int,input().split()))
chest=0
biceps=0
back=0
for i in range(0,t,3):
    chest=chest+a[i]
    if i+1<t :
        biceps=biceps+a[i+1]
    if i+2 <t:
        back=back+a[i+2]
if chest>biceps and chest>back:
    print("chest")
if biceps>chest and biceps>back:
    print("biceps")
if back>biceps and biceps>chest:
    print("back")

n=int(input())
j=n+1
a=[0]*n
a=list(map(int,input().split()))
bi=0
ba=0
ch=0
if n==1:
    ch=ch+a[0]
elif n==2:
    ch=ch+a[0]
    bi=bi+a[1]
else:
    j=0
    for i in range(0,int(n/3)):
        ch=ch+a[j]
        bi=bi+a[j+1]
        ba=ba+a[j+2]
        j=j+3
    t=n%3
    if t==1:
        ch=ch+a[n-t]
    elif t==2:
        ch=ch+a[n-t]
        bi=bi+a[n-t+1]
print(ch,bi,ba)
if ch>=bi:
    if ch>=ba:
        print("chest")
    else:
        print("back")
elif bi>=ba:
    print("biceps")
else:
    print("back")

d={"chest":0,"biceps":0,"back":0}
n=int(input())
p=input()
l=p.split()
for i in range(len(l)):
    l[i]=int(l[i])
    if l[i]%3==0:
        d["chest"]+=l[i]
    elif i%3==1:
        d["biceps"]+=l[i]
    else:
        d["back"]+=l[i]
key_max = max(d.keys(), key=(lambda k: d[k]))
print(key_max)

def getMostExercised():
    numberofExercies=input('')
    repeats=raw_input('').split(' ')
    muscles=[0,0,0]
    for x in repeats:
        ind=repeats.index(x)
        if ind%3==0:
            muscles[0]+=eval(x)
        elif ind%3==2:
            muscles[2]+=eval(x)
        else:
            muscles[1]+=eval(x)
    if muscles[0]>muscles[1] and muscles[0]>muscles[2]:
        print "chest"
    elif muscles[1]>muscles[2] and muscles[1]>muscles[0]:
        print "biceps"
    else:
        print"back"
getMostExercised()

n = int(input())
l = list(map(int, input().split()))
chest = 0
biceps = 0
back = 0
chest = l[::3]
biceps = l[1::3]
back = l[3::3]
chest = sum(chest)
biceps = sum(biceps)
back = sum(back)
if biceps > back and biceps > chest:
    print('biceps')
elif chest > biceps and chest > back:
    print('chest')
else:
    print('back')

n=int(input())
a=list(map(int,input().split()))
g=0
b=0
s=0
count=0
for i in a:
    count+=1
    if count==1:
        g=g+i
    if count==2:
        b=b+i
    if count==3:
        s=s+i
    if count>3:
         count=0
if max(g,b,s)==g:
    print('chest')
else:
    if max(g,b,s)==b:
        print('biceps')
    else:
        print('back')

no = int(input())

x=list(map(int,input().split()))

chest=0
bicep=0
back=0

for i in range(0,no,3):
	chest+=x[i]

for i in range(1,no,3):
	bicep+=x[i]

for i in range(2,no,3):
	back+=x[i]

if((chest>bicep and chest>back)):
	print("chest")
elif((bicep>chest and bicep>back)):
	print("bicep")
elif((back>chest and back>bicep)):
	print("back")

n = int(input())
c,bi,b = 0,0,0
x = list(map(int,input().split()))
result ={}
counter =1
for i in x:
    if counter in result.keys():
        result[counter] +=i
    else:
        result[counter] =i
    counter +=1
    if counter>3:
        counter =0
l = max(result.values())
if result[1] ==l:
    print("chest")
elif result[2] ==l:
    print("biceps")
else:
    print("back")

chest ,biceps, back = 0,0,0
n = int(input())

l = list(map(int,input().split()))

for i in range(0,n,3):
	chest += i

for i in range(1,n,3):
	biceps+= i

for i in range(2,n,3):
	back += i

if chest > back and chest > biceps:
	print('chest')
elif back > chest and back > biceps:
	print('back')
else:
	print('biceps')

n = int(input())
A = list(map(int, input().split()))
a, b, c = 0, 0, 0
i = 1
while i < n:
	a += A[i - 1]
	i += 3
i = 1
while i < n:
	b += A[i - 1]
	i += 3
i = 1
while i < n:
	c += A[i - 1]
	i += 3
if a >= b and a >= c:
	print("back")
elif b >= a and b >= c:
	print("biceps")
else:
	print("chest")

x=int(input());input()
if x%3==1:print("chest")
elif x%3==2:print("biceps")
else:print("back")

n = int(input())
l = list(map(int, input().split()))

count = [0] * 3
_max = 0
_max_idx = 0
for i, v in enumerate(l):
    idx = i % 3
    count[idx] += v
    if count[idx] > _max:
        _max = count[idx]
        _max_idx = idx
print(['chest', 'bicepts', 'back'][_max_idx])

n = int(input())
A = list(map(int, input().split()))
a, b, c = 0, 0, 0
i = 1
while i <= n:
	a += A[i - 1]
	i += 3
i = 2
while i <= n:
	b += A[i - 1]
	i += 3
i = 3
while i <= n:
	c += A[i - 1]
	i += 3
if a >= b and a >= c:
	print("back")
elif b >= a and b >= c:
	print("biceps")
else:
	print("chest")

# import sys
# sys.stdin=open('input.in','r')
# sys.stdout=open('output.out','w')
s=int(input())
l=list(map(int,input().strip().split()[:s]))
l.insert(0,"#$@%")
bicep=chest=back=0
for x in range(1,len(l)):
	if x%3==0:
		back+=l[x]
	elif x%2==0 :
		bicep+=l[x]
	else:
		chest+=l[x]
if max(chest,bicep,back)==chest:
	print('chest')
elif max(chest,bicep,back)==bicep:
	print('biceps')
else:
	print('back')

n=int(input())
x=[int(p) for p in input().split(" ")]
for i in range(n):
  if (x[i]==max(x)):
    j=i+1
if (j%2==0):
  print("biceps")
elif (j%3==0):
  print("back")
else:
  print("chest")

n = int(input())
a = list(map(int, input().split()))
if len(a) % 2 == 0:
    print('biceps')
elif len(a) % 3 == 0:
    print('back')
else:
    print('chest')

n=int(raw_input())

exercises=raw_input().split()
chest=0
back=0
biceps=0

for i in range(n):
    if i%3==0:
        chest += int(exercises[i-1])
    elif i%3==1:
        back += int(exercises[i-1])
    else:
        biceps += int(exercises[i-1])

if chest > biceps and chest > back:
    print 'chest'

if back > biceps and back > chest:
    print 'back'

if biceps > chest and biceps > back:
    print 'biceps'

n=int(input())
l=list(map(int,input().split()))
sum1=0
sum2=0
sum3=0
for i in range(0,n,2):
    sum1=sum1+l[i]
for i in range(1,n,2):
    sum2=sum2+l[i]
for i in range(2,n,2):
    sum3=sum3+l[i]
if sum1>sum2:
    if sum3>sum1:
        print("back")
    if sum1>sum3:
        print("chest")
if sum2>sum3:
    if sum2>sum1:
        print("biceps")
    else:
        print("chest")

n = int(input())
a = list(map(int,input().split()))
from collections import defaultdict
d = defaultdict(list)
for i in range(0,len(a)):
    m = i%3
    d[m].append(a[i])
d = dict(d)
print(d)
x = max(d.items(),key=lambda x:sum(x[1]))[0]

if x == 0:
    print("chest")
elif x == 1:
    print("biceps")
elif x == 2:
    print("back")

input()
a = list(map(int, input().split()))
ch = 0
bi = 0
ba = 0
for i in range(0, len(a), 4):
    ch += i
for j in range(1, len(a), 4):
    bi += j
for k in range(2, len(a), 4):
    ba += k
if max(ch,bi,ba) == ch:print("chest")
elif max(ch,bi,ba) == bi:print("biceps")
else:print("back")

n=int(input())
p=list(map(int,input().split()))
c=0
bic=0
back=0
if n==1:
	c+=p[0]
elif n==2:
	c+=p[0]
	bic+=p[1]
else:
	for i in range(0,n-2,3):
		c+=p[i]
		if i+1<n:
			bic+=p[i+1]
		if i+2<n:
			back+=p[i+2]
print(c,bic,back)
d={c:"chest",bic:"biceps",back:"back"}
print(d[max(c,bic,back)])

n=int(input())
x=[int(p) for p in input().split(" ")]
for i in range(n):
  if (x[i]==max(x)):
    j=i+1
if (j%2==0):
  print("biceps")
if (j%3==0):
  print("back")
else:
  print("chest")

n=int(input())
l=[int(i) for i in input().split()]
a=0;b=0;c=0
j=1
for i in range(n):
    if i+1==j:
        a+=l[i]
    elif i+1==j:
        b+=l[i]
    else:
        c+=l[i]
    j+=1
if max(a,b,c)==a:
    print("chest")
elif max(a,b,c)==b:
    print("biceps")
else:
    print("back")

a = int(input())
l = list(map(int, input().split()))
x, y, z = 0, 0, 0

for i in range(1,a+1):
    if i % 3 == 1:
        x += i
    elif i % 3 == 2:
        y += i
    else:
        z += i

if x > y and x > z:
    print("chest")
elif y > x and y > z:
    print("biceps")
else:
    print("back")

n = int(input())
a = list(map(int, input().split()))
muscles = [0, 0, 0]
answer = ["Chest", "Biceps", "Back"]

muscles[0] = sum(a[::3])    # chest
muscles[1] = sum(a[1::3])   # biceps
muscles[2] = sum(a[2::3])   # back

strongest = muscles.index(max(muscles))
print(answer[strongest])

a=int(input())
l=list(map(int,input().split()))
ch=0
bic=0
bac=0
s=len(l)
count=0
for i in range(s):
    if count%3==0:
        i=0
        count=0
    if (i+1)%3==0:
        bac+=l[i]
    elif (i+1)%2==0:
        bic+=l[i]
    else:
        ch+=l[i]
    count+=1
e=max([bac,bic,ch])
if e==bac:
    print('back')
elif e==bic:
    print('biceps')
else:
    print('chest')

x=int(input());input()
if x%3==1:print("chest")
elif x%3==2:print("biceps")
else:print("back")

n = int(input())
a = []
a += map(int,input().split())
c = 0
bic = 0
bk = 0
for i in range(0,n,3):
	c += a[i]
	if i+1 < len(a):
		bic += a[i+1]
	if i+2 < len(a):
		bk += a[i+2]
	print(i,c,bic,bk)
if max(c,bic,bk) == c:
	print("chest")
elif max(c,bic,bk) == bic:
	print("biceps")
else:
	print("back")

n=int(input())
p=list(map(int,input().split()))
c=0
bic=0
back=0
if n==1:
	c+=p[0]
elif n==2:
	c+=p[0]
	bic+=p[1]
else:
	for i in range(0,n-2,3):
		c+=p[i]
		if i+1<n:
			bic+=p[i+1]
		if i+2<n:
			back+=p[i+2]
d={c:"chest",bic:"biceps",back:"back"}
print(d[max(c,bic,back)])

n = int(input())
l = list(map(int,input().split()))
c = 0
bi = 0
b = 0
for i in range(n):
    if i%3==0:
        c=c+l[i]
    elif i%3==1:
        bi = bi+l[i]
    elif i%3==2:
        b = b+l[i]
print(c,bi,b)
if c>bi and c>b:
    print('chest')
elif bi>c and bi>b:
    print('biceps')
elif b>c and b>bi:
    print('back')

n = int (input ())
a = list (map (int, input ().split ()))

chest = []
biceps = []
back = []

for i in range (1,n+1):
	if i%3 == 1:
		chest.append (i-1)
	elif i%3 == 2:
		biceps.append (i-1)
	else:
		back.append (i-1)

x = sum (chest)
y = sum (biceps)
z = sum (back)

if max (x,y,z) == x:
	print ('chest')
elif max (x,y,z) == y:
	print ('biceps')
else:
	print ('back')

n=int(input())
lst=list(map(int,input().split()))
if n%3==1:
    print("chest")
elif n%3==2:
    print("biceps")
elif n%3==0:
    print("back")

a=int(input())

b=list(map(int,input().split()))

ch=0
bi=0
ba=0

for i in range(len(b)):
    if(i<3):
        if(i==0):
            ch+=b[i]
        if(i==1):
            bi+=b[i]
        if(i==2):
            ba+=b[i]
    else:
        if(i%3==0):
            ch+=b[i]
        if(i%3==1):
            bi+=b[i]
        if(i%3==2):
            ba+=b[i]

if(ch>bi and ch>ba):
    print('chest')

elif(ch<bi and bi>ba):
    print('bisceps')

elif(ba>ch and ba>bi):
    print('back')

n = int(input())
a = [int(i) for i in input().split()]
chest = 0
biceps = 0
back = 0
if n >= 3:
    for i in range(0, n, 3):
        chest += a[i]
    for i in range(1, n, 3):
        biceps += a[i]
    for i in range(2, n, 3):
        back += a[i]
elif n == 2:
    for i in range(0, n + 1, 3):
        chest += a[i]
    for i in range(1, n + 1, 3):
        biceps += a[i]
elif n == 1:
    print(a[0])
if chest > biceps and chest > back:
    print('chest')
elif biceps > chest and biceps > back:
    print('biceps')
elif back > biceps and back > chest:
    print('back')

n = int(input())

k = list(map(int,input().split()))
count1 = 0
count2 = 0
count3 = 0
temp = 0
max = 0
for i in range(len(k)):

    if i%3 == 0:
        count1+=k[i]
        if count1 > max:
            max = count1
            temp = 'chest'

    elif i!=0 and i%2==0:
        count3+=k[i]
        if count3 > max:
            max = count3
            temp = 'back'
    else:
        count2+=k[i]
        if count2 > max:
            max = count2
            temp = 'biceps'

print(temp)

n = int(input())
s = [int(i) for i in input().split()]
c = 0
b = 0
ba = 0

for i in range(0,n,3):
	c+=s[i]
for i in range(1,n,3):
	b+=s[i]

for i in range(2,n,3):
	ba+=1

print(c,b)
if c>b and c>ba:
	print("chest")
elif b>ba and b>c :
	print("biceps")
else:
	print("back")

import sys
n = input()
arr = map(int,sys.stdin.readline().split())
i = 1
chest = 0
back = 0
biceps = 0
while(i <= n):
    if(i%2 == 0):
        biceps += arr[i-1]
    elif(i%3 == 0):
        back += arr[i-1]
    else:
        chest += arr[i-1]
    i += 1
list = [chest,biceps,back]
print list
c = list.index(max(list))
print c
if(c == 0):
    print "chest"
elif(c == 1):
    print "biceps"
else:
    print "back"

t = int(input())
x = list(map(int, input().split()))
ind = x.index(max(x))+1
print (ind)
if (ind%3==1):
	print ("chest")
elif (ind%3==2):
	print ("biceps")
elif ind%3==0:
	print ("back")

n = int(input())

k = list(map(int,input().split()))
count1 = 0
count2 = 0
count3 = 0
max = 0
temp = 0
for i in range(0,len(k),3):
    count1+=k[i]
    if count1>max:
        max = count1
        temp = 'ches'

for i in range(1,len(k),3):
    count2+=k[i]
    if count2>max:
        max = count2
        temp = 'biceps'

for i in range(2,len(k),3):
    count3+=k[i]
    if count3>max:
        max = count3
        temp = 'back'

print(temp)


def add(a,b):
    if a+b>=mod:
        return (a+b)%mod
    return a+b
n=int(input())*2
s=input()
d=[[0,0] for i in range(len(s)+1)]
aux=''
for i in range(len(s)):
    if s[i]=='(':
        d[i][1]=i+1
        x=aux+')'
        for j in range(1,i+2):
            if x[j::] ==s[0:len(x)-j]:
                d[i][0]=len(x[j::])
                break
    else:
        d[i][0]=i+1
        x=aux+'('
        for j in range(1,i+2):
            if x[j::]  ==s[0:len(x)-j]:
                d[i][1]=len(x[j::])
                break
    aux+=s[i]
d[len(s)][1]=len(s)
d[len(s)][0]=len(s)
dp=[[[0 for i in range(len(s)+1)] for j in range(n//2+1)] for k in range(n+1)]
dp[0][0][0]=1
mod=10**9+7
for i in range(n):
    for j in range(1,(n//2)+1):
        for k in range(len(s)+1):
            dp[i+1][j-1][d[k][0]]=(dp[i][j][k]+dp[i+1][j-1][d[k][0]])%mod
    for j in range(n//2):
        for k in range(len(s)+1):
            dp[i+1][j+1][d[k][1]]=(dp[i][j][k]+dp[i+1][j+1][d[k][1]])%mod
print(dp[n][0][len(s)]%mod)

MOD=10**9+7
n=int(input())
s=[c=='(' for c in input()]
m=len(s)
z=[[0,0]]
for v in s:
 a=z[-1][v]
 z[-1][v]=len(z)
 z.append(z[a][:])
z[m][0]=z[m][1]=m
dp=[[0 for _ in range(m+1)] for _ in range(n+1)]
dp[0][0]=1
for _ in range(2*n):
 ndp=[[0 for _ in range(m+1)] for _ in range(n+1)]
 for i in range(n+1):
  for j in range(m+1):
   if dp[i][j]<1:continue
   if i>0:ndp[i-1][z[j][0]]=(ndp[i-1][z[j][0]]+dp[i][j])%MOD
   if i<n:ndp[i+1][z[j][1]]=(ndp[i+1][z[j][1]]+dp[i][j])%MOD
 dp=ndp
print(dp[0][m])

MOD=10**9+7
n=int(input())
s=[c=='(' for c in input()]
m=len(s)
z=[[0,0]]
for v in s:
 a=z[-1][v]
 z[-1][v]=len(z)
 z.append(z[a][:])
z[m][0]=z[m][1]=m
dp=[[0 for _ in range(m+1)] for _ in range(n+1)]
dp[0][0]=1
for _ in range(2*n):
 ndp=[[0 for _ in range(m+1)] for _ in range(n+1)]
 for i in range(n+1):
  for j in range(m+1):
   if i>0:ndp[i-1][z[j][0]]=(ndp[i-1][z[j][0]]+dp[i][j])%MOD
   if i<n:ndp[i+1][z[j][1]]=(ndp[i+1][z[j][1]]+dp[i][j])%MOD
 dp=ndp
print(dp[0][m])

def add(a,b):
    if a+b>=mod:
        return (a+b)%mod
    return a+b
n=int(input())*2
s=input()
d=[[0,0] for i in range(len(s)+1)]
aux=''
for i in range(len(s)):
    if s[i]=='(':
        d[i][1]=i+1
        x=aux+')'
        for j in range(1,i+2):
            if x[j::] ==s[0:len(x)-j]:
                d[i][0]=len(x[j::])
                break
    else:
        d[i][0]=i+1
        x=aux+'('
        for j in range(1,i+2):
            if x[j::]  ==s[0:len(x)-j]:
                d[i][1]=len(x[j::])
                break
    aux+=s[i]
d[len(s)][1]=len(s)
d[len(s)][0]=len(s)
dp=[[[0 for i in range(len(s)+1)] for j in range(n//2+1)] for k in range(n+1)]
dp[0][0][0]=1
mod=10**9+7
for i in range(n):
    for j in range(1,(n//2)+1):
        for k in range(len(s)+1):
            dp[i+1][j-1][d[k][0]]=add(dp[i][j][k],dp[i+1][j-1][d[k][0]])
    for j in range(n//2):
        for k in range(len(s)+1):
            dp[i+1][j+1][d[k][1]]=add(dp[i][j][k],dp[i+1][j+1][d[k][1]])
print(dp[n][0][len(s)]%mod)

MOD=10**9+7
n=int(input())
s=[c=='(' for c in input()]
m=len(s)
z=[[0,0]]
for v in s:
 n=z[-1][v]
 z[-1][v]=len(z)
 z.append(z[n][:])
z[m][0]=z[m][1]=m
dp=[[0 for _ in range(m+1)] for _ in range(n+1)]
dp[0][0]=1
for _ in range(2*n):
 ndp=[[0 for _ in range(m+1)] for _ in range(n+1)]
 for i in range(n+1):
  for j in range(m+1):
   if i>0:ndp[i-1][z[j][0]]=(ndp[i-1][z[j][0]]+dp[i][j])%MOD
   if i<n:ndp[i+1][z[j][1]]=(ndp[i+1][z[j][1]]+dp[i][j])%MOD
 dp=ndp
print(ndp[0][m])

n=int(input())*2
s=input()
d=dict()
aux=''
for i in range(len(s)):
    if s[i]=='(':
        d.update({(i,1):i+1})
        x=aux+')'
        for j in range(1,i+2):
            print(x[j::],s[0:len(x)-j],len(x),j)
            if x[j::] ==s[0:len(x)-j]:
                d.update({(len(aux),0):len(x[j::])})
                break
    else:
        d.update({(i,0):i+1})
        x=aux+'('
        for j in range(1,i+2):
            if x[j::]  ==s[0:len(x)-j]:
                d.update({(len(aux),1):len(x[j::])})
                break
    aux+=s[i]
d.update({(len(s),1):len(s)})
d.update({(len(s),0):len(s)})
dp=[[[0 for i in range(len(s)+1)] for j in range(n//2+1)] for k in range(n+1)]
dp[0][0][0]=1
mod=10**9+7
for i in range(n):
    for j in range(1,(n//2)+1):
        for k in range(len(s)+1):
            dp[i+1][j-1][d[(k,0)]]=(dp[i][j][k]+dp[i+1][j-1][d[(k,0)]])%mod
    for j in range(n//2):
        for k in range(len(s)+1):
            dp[i+1][j+1][d[(k,1)]]=(dp[i][j][k]+dp[i+1][j+1][d[(k,1)]])%mod
print(dp[n][0][len(s)]%mod)