object Main {

  def main(args: Array[String]): Unit = {
    scala.io.StdIn.readLine()
    val line = scala.io.StdIn.readLine().dropWhile(_ == '#') ++ "#."
    println(line.groupBy(identity).values.map(_.size - 1).reduce((a, b) => if (a > b) b else a))
  }

}