n = gets.to_i puts n == 1 ? 0 : (n - 1).to_s(2).length