object Main {

  import scala.collection.mutable.ArrayBuffer

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val H, W = sc.nextInt
    val S = Array.fill(H)(sc.next)
    val spaces = Array.fill[(Int, Int)](H * W)((0, 0))
    var indexes = new ArrayBuffer[Int]()
    for (w <- 0 until W) {
      var count = 0
      indexes.clear()
      for (h <- 0 until H) {
        if (S(h)(w) == '.') {
          count += 1
          indexes += h
        } else {
          for (h <- indexes) {
            spaces(h * W + w) = (count, spaces(h * W + w)._2)
          }
          count = 0
          indexes.clear()
        }
      }
      for (h <- indexes) {
        spaces(h * W + w) = (count, spaces(h * W + w)._2)
      }
    }
    for (h <- 0 until H) {
      var count = 0
      indexes.clear
      for (w <- 0 until W) {
        if (S(h)(w) == '.') {
          count += 1
          indexes += w
        } else {
          for (w <- indexes) {
            spaces(h * W + w) = (spaces(h * W + w)._1, count)
          }
          count = 0
          indexes.clear
        }
        for (w <- indexes) {
          spaces(h * W + w) = (spaces(h * W + w)._1, count)
        }
      }
    }
    val result = spaces.map(x => x._1 + x._2).max - 1
    println(result)
  }
}