n =int(input()) counter = 0 a = 0 while (n != 0): a = n % 2 n = int(n / 2) + a counter += 1 if (n == 1): break print(counter)