import java.util.*

fun main(args:Array<String>){
    val (h,w) = readLine()!!.split(" ").map{it.toInt()}
    val s = Array(h) {readLine()!!}
    var sum1 = Array(h) {IntArray(w)}
    var sum2 = Array(h) {IntArray(w)}
    for(i in 0 until h){
        for(j in 0 until w){
            if(s[i][j] == '.'){
                sum1[i][j]++
                sum2[i][j]++
            }
            if(j > 0 && s[i][j] == '.') sum1[i][j] += sum1[i][j - 1]
        }
        for(j in w - 2 downTo 0){
            if(s[i][j] == '.' && s[i][j + 1] == '.') sum1[i][j] = sum1[i][j + 1]
        }
    }
    for(j in 0 until w){
        for(i in 0 until h){
            if(i > 0 && s[i][j] == '.') sum2[i][j] += sum2[i - 1][j]
        }
        for(i in h - 2 downTo 0){
            if(s[i][j] == '.' && s[i + 1][j] == '.') sum2[i][j] = sum2[i + 1][j]
        }
    }
    var ans = 0
    for(i in 0 until h){
        for(j in 0 until w){
            ans = Math.max(ans, sum1[i][j] + sum2[i][j] - 1)
        }
    }
    println(ans)
}
