def get_int
  gets.chop.to_i
end

def get_ints
  gets.chop.split.map(&:to_i)
end

def get_double
  gets.chop.to_f
end

def get_str
  gets.chop
end

def get_strs
  gets.chop.split
end

def main
  n = get_int
  s = get_str
  ans = 1
  pre_c = s[0]
  1.upto(s.size - 1) do |i|
    c = s[i]
    if pre_c != c
      ans += 1
    end
    pre_c = c
  end
  puts ans
end

if __FILE__ == $0
  main
end

