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