current = 0
number = gets.to_i
input_array = gets.chomp.split("")

(number - 1).times{
    if input_array[current] == input_array[current + 1]
        input_array[current] = nil
    end
    current += 1
}
puts input_array.compact.count

