N = gets.to_i if N.digits(2).sum == 1 puts Math.log(N, 2).floor else puts Math.log(N, 2).floor + 1 end