import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(),count = 0; if(num == 1) { System.out.println(0); return; } int c = 1; while(true) { if(num - c <= c) { System.out.println(count + 1); return; } if(num - c > c) { c *= 2; count++; } } } }