import java.util.Scanner; public class Main { public static void main(String[] a) { String S=Integer.toBinaryString(new Scanner(System.in).nextInt()); System.out.println(S.length()-(S.matches("^10*$")?1:0)); } }