def main(): n = int(input()) q = n count = 0 while q >= 2: q = q // 2 count += 1 ans = count + 1 if q % 2 == 0: ans -= 1 print(ans) if __name__ == "__main__": main()