#include <stdlib.h>
int main() {
int i=2;
int n=0;
int s=0;
for (;s+i<1000; i*=2, ++n)
s+=i;
printf("%d",n);
system("pause");
return 0;
}