#include<stdio.h>
int main()
{
int a[80]={6 ,153 ,298 ,313 ,317 ,332 ,345 ,376 ,486 ,528 ,562 ,592 ,592, 737 ,820 ,1058 ,1151 ,1234 ,1262 ,1263 ,1302 ,1363 ,1452, 1477 ,1569 ,1606 ,1660 ,1731 ,1748 ,1847 ,1959 ,1996 ,2001 ,2189 ,2192 ,2333 ,2357 ,2437 ,2536 ,2615 ,2674 ,2689 ,2716, 2834 ,2854 ,2908 ,3075 ,3205 ,3229 ,3358 ,3473 ,3477 ,3504 ,3596 ,3600 ,3676 ,3683 ,3800 ,3859 ,3884 ,3955, 3985, 4055 ,4087 ,4099, 4220 ,4254, 4310 ,4415, 4434, 4500 ,4514, 4522, 4588, 4598, 4797, 4865, 4888, 4904, 4978};
int low=0,high=80,mid;
while(low <= high)
{
mid = (low + high)/2;
if(a[mid]==4254)
{
return mid;
}
else if(a[mid] > 4254)
high = mid - 1;
else
low = mid + 1;
}
return 0;
}