# -*- coding: utf-8 -*- import sys n = int(input()) last = 1 count = 0 while(True): if last*2 < n: last *= 2 count += 1 elif n - last == 1: count += 1 break else: count += 1 break print(count)