b;main(){scanf("%d",&b);b=!printf("%d",b=log(b-1)/log(2));}