x = int(input())
sticks = [64]
while sum(sticks) > x:
shortest = min(sticks)
half = shortest // 2
sticks.remove(shortest)
sticks.append(half)
sticks.append(half)
if sum(sticks[:-1]) >= x:
sticks.pop()
print(len(sticks))
PREVIOUS[백준] 색종이 만들기