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