L;f(x,y){return 8*x*(x+=y)>L?0:x%2+f(x,x-y)+f(x,y);}main(){L=!printf("%d",f(2,scanf("%d",&L)));}