https://www.acmicpc.net/problem/2292
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int a=1;
int t=1;
if(n==1) System.out.print(1);
else{
while(true){
if(n<a){
System.out.format("%d",t);
break;
}
else if(n==a){
System.out.print(t);
break;
}
a+=6*t;
t++;
}
}
}
}