#include<stdio.h>
main(N,L,B)
{
	N=114067,L=B=N&1;
    while(N>>=1)B=(L=(N&1)?L+1:0)>B?L:B;
    return !printf("%d",B);
}
