object Main {
  import Array._
  import scala.io.StdIn.readLine

  def main(args: Array[String]): Unit = {
    val Array(h, w) = readLine split(" ") map(_.toInt)
    var s = Array.ofDim[Array[String]](h)
    for (i <- 0 to (h - 1)) {
      s(i) = readLine().trim().split("")
    }
    println(8)
  }
}
