import scala.annotation.tailrec
import io.StdIn

object Main extends App {
  val n = StdIn.readInt
  val s = StdIn.readLine

  @tailrec
  def rec(acc:Int, x:Int, ch:Iterator[Char]):Int = {
    if(!ch.hasNext || x == 2) acc
    else {
      if(ch.next == 'x') {
        if(x == 0) rec(acc+1, 1, ch)
        else rec(acc, 2, ch)
      }
      else rec(acc+1, 0, ch)
    }
  }

  println( rec(0,0,s.iterator) )
}
