def main

  n = gets().chomp.to_i
  r = /[a-z]/
  colors = []

  gets().split("").each {|v| colors << v if r.match(v)}
  return if (n < 1 && 100000 < n) || n != colors.length()

  colors.each_with_index.reverse_each do |slime, index|

    next if colors.length == index
    colors.delete_at(index) if slime == colors[index +1]
  end

  p colors.size

end

main