N=gets.to_i
S=gets.chomp.to_s.chars

neighbor_char=''
result_str=[]

N.times {
    if neighbor_char==S.first
        S.shift
    else
        neighbor_char=S.shift
        result_str.push(neighbor_char)
    end
}

puts result_str.length