N = int(input()) cnt =0 while N>1: N = N/2 cnt+=1 if N%2>1: cnt+=1 print(cnt)