target = int(input())
num = 1
for i in range(target):
if target <= num:
print(i)
break
else:
num += 6*i
target = int(input())
num = 1
for i in range(0, target+1):
if target == 1:
print(i+1)
break
else:
if i == 0:
num = 1
else:
num += 6*i
if num >= target:
print(i+1)
break
1 : 1개
2-7 : 6개 => 6*1
8-19 : 12개 => 6*2
20-37 : 18개 => 6*3
38-61 : 24개 => 6*4