length = gets.to_i
slimes = gets

if length == 0
  puts 0
  exit
end

last_slime = slimes[0]
count = 0
(0..length).each do |i|
  if last_slime != slimes[i]
  	count += 1
    last_slime = slimes[i]
  end
end

puts count