fun main(args: Array<String>) {
    val (H, W) = readLine()!!.split(" ").map { it.toInt() }
    val S = (1..H).map { readLine()!!.map { it=='.' } }
    val L = Array(H+2){ IntArray(W+2){0} }
    val R = Array(H+2){ IntArray(W+2){0} }
    val U = Array(H+2){ IntArray(W+2){0} }
    val D = Array(H+2){ IntArray(W+2){0} }
    val ans = Array(H+2){ IntArray(W+2){0} }

    for (i in 1..H) for (j in 1..W) {
        if(S[i-1][j-1]) {
            L[i][j] = L[i][j-1]+1
            U[i][j] = U[i-1][j]+1
            ans[i][j] += L[i][j] + U[i][j]
        }
    }
    for (i in H downTo 1) for (j in W downTo 1) {
        if(S[i-1][j-1]) {
            R[i][j] = R[i][j+1]+1
            D[i][j] = D[i+1][j]+1
            ans[i][j] += R[i][j] + D[i][j]
        }
    }
    println( ans.map { it.max()!! }.max()!!-3 )


}