#!/bin/python3

import math
import os
import random
import re
import sys

#Use x for seeing the actual binary number in reverse form

def binary(n):
    c=0
    k=1
    #x=[]
    while(n):
        if n%2==1:
            #x.append("1")
            c += 1
            if c>k:
                k+=1
        else:
            c=0
            #x.append("0")
            
        n=n//2    
    
    #print(x)#Number in binary in list form
    print(k)
      

if __name__ == '__main__':
    n = int(input())
    binary(n)


