object Main {
  def main(args: Array[String]): Unit = {
    scala.io.StdIn.readLine()
    @scala.annotation.tailrec
    def go(l: List[Char], bf: List[Char]): List[Char] =
      if (l.isEmpty) bf
      else if (l.head == '#') go(l.tail, bf)
      else l ++ bf
    val line = go(scala.io.StdIn.readLine().reverse.toList, Nil) ++ "#."
    println(line.groupBy(identity).values.map(_.size - 1).reduce((a, b) => if (a > b) b else a))
  }
}