#!/usr/bin/python3

n = int(input())
ct = 0
while n > 3:
    ct += 1
    n = n//2
print(n + ct)
