Module _20191029

    Sub Main()
        'https://atcoder.jp/contests/abc143/tasks/abc143_c

        Dim iCount As Integer = CLng(Console.ReadLine())
        Dim sString As String = Console.ReadLine()

        Dim arrChar As Char() = sString

        Dim sBeforeColor As String = arrChar(0)
        Dim iTotalCount As Integer = 1

        For i As Integer = 1 To iCount - 1

            If arrChar(i) <> sBeforeColor Then

                iTotalCount += 1
                sBeforeColor = arrChar(i)

            End If

        Next

        Console.WriteLine(iTotalCount)

    End Sub

End Module