fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val S = readLine()!!.toCharArray()
    var ans = 0
    var cur = 'X'
    S.forEach { s ->
        if (cur == s) return@forEach
        ans++
        cur = s
    }
    println(ans)
}