#include #include int main(){ long long n; scanf("%lld",&n); n/=3; n = sqrt(n); if(n <= 0){printf("0\n");}else{printf("%lld\n",n);} return 0; }