import kotlin.math.max

fun intList() = readLine()?.split(" ")?.map(String::toInt) ?: TODO()
fun main() {
    data class Count(var value: Int)

    fun Count?.count(): Int {
        return this?.value ?: 0
    }

    class XY(var x: Count?, var y: Count?) {
        fun total() = x.count() + y.count()
        override fun toString(): String {
            return total().toString()
        }
    }
    val (h, w) = intList()
    val matrix = 0.until(h).map {
        readLine() ?: return
    }
    val array = Array(h) { Array(w) { XY(null, null) } }
    matrix.forEachIndexed { y, s ->
        var xCount = Count(0)
        s.forEachIndexed { x, v ->
            if (v == '.') {
                array[y][x].x = xCount
                if (y == 0) {
                    array[y][x].y = Count(1)
                } else {
                    val count = array[y - 1][x].y
                    if (count == null) {
                        array[y][x].y = Count(1)
                    } else {
                        count.value += 1
                        array[y][x].y = count
                    }
                }
                xCount.value += 1
            } else {
                xCount = Count(0)
            }
        }
    }
    var m = 0
    array.forEach {
        it.forEach {
            m = max(m, it.total() - 1)
        }
    }
    println(m.toString())
}
