N = int(input()) ans = len(bin(N))-3 if bin(N).count("1") > 1: ans += 1 print(ans)