require 'pp'

def gets; ARGF.gets; end

class Solver

  def main
    n = gets.chomp.to_i
    s = gets.chomp

    ans = 0
    lc = ''
    0.upto(n-1) do |i|
      if lc != s[i]
        ans += 1
        lc = s[i]
      end
    end

    puts ans
  end
end

if __FILE__ == $0
  Solver.new.main
end
