#include <stdio.h> int main() { int n,sum=1; scanf("%d",&n); for (int i=0; i<100000000; i++) { sum+=6*i; if (n<=sum) { printf("%d",i+1); break; } } return 0; }
To embed this project on your website, copy the following code and paste it into your website's HTML: