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

  def main(args: Array[String]): Unit = {
    // val Array(h, w) = io.StdIn.readLine().split(" ").map(_.toInt)
    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("")
    }
    var dw = Array.ofDim[Int](h, w)
    var dh = Array.ofDim[Int](w, h)
    for ( i <- 0 to (h - 1) ) {
      var cw = Array.ofDim[Int](w)
      var count = 0
      for ( j <- 0 to (w - 1) ) {
        if (s(i)(j) == "#") {
          cw(j) = 0
        }
        else if (j == 0 || s(i)(j - 1) == "#") {
          def loop1(i: Int, k: Int, w: Int, s: Array[Array[String]] , count: Int): Int = {
            if (k > w - 1 || s(i)(k) != ".") {
              return count
            }
            else {
              return loop1(i, (k + 1), w, s, (count + 1))
            }
          }
          count = loop1(i, j, w, s, 0)
          cw(j) = count
        }
        else {
          cw(j) = count
        }
      }
      dw(i) = cw
    }
    for ( j <- 0 to (w - 1) ) {
      var ch = Array.ofDim[Int](h)
      var count = 0
      for ( i <- 0 to (h - 1) ) {
        if (s(i)(j) == "#") {
          ch(i) = 0
        }
        else if (i == 0 || s(i - 1)(j) == "#") {
          def loop2(k: Int, j: Int, h: Int, s: Array[Array[String]] , count: Int): Int = {
            if (k > h - 1 || s(k)(j) != ".") {
              return count
            }
            else {
              return loop2((k + 1), j, h, s, (count + 1))
            }
          }
          count = loop2(i, j, h, s, 0)
          ch(i) = count
        }
        else {
          ch(i) = count
        }
      }
      dh(j) = ch
    }
    var max = 0
    for (i <- 0 to (h - 1)) {
      for (j <- 0 to (w - 1)) {
        var sum = dw(i)(j) + dh(j)(i)
        if (max < sum) {
          max = sum
        }
      }
    }
    println(max - 1)
  }
}
