import java.util.*; public class Biscuit{ public static void main(String[] arg){ int n,res=0; Scanner sc = new Scanner(System.in); n = sc.nextInt(); while(n != 1){ if(n%2 ==1){ n = (n+1) /2; }else{ n = n/2; } res++; } System.out.println(res); } }