import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Yukicoder47 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String n = Integer.toBinaryString(Integer.parseInt(br.readLine())); int res = n.length() - 1; for (int i = 1; i < n.length(); i++) { if (n.charAt(i) == '1') { res++; break; } } System.out.println(res); } }