fun calc143C(s: String): Int = s.fold((0 to  '0')) { acc, c ->
    when (c) {
        acc.second -> acc.first to c
        else -> acc.first + 1 to c
    }
}.first

fun main(args: Array<String>) {
    val N = readLine()!!
    val s = readLine()!!
    println(calc143C(s))
}
