fun main(args: Array<String>) {
    val (H, W) = listOfInt()
    val S = Array(H) { next() }
    val HH = Array(H) { IntArray(W) }
    val WW = Array(H) { IntArray(W) }
    val DOT = '.'
    for (h in 0 until H) {
        var w = 0
        while (w < W) {
            if (S[h][w] == DOT) {
                var c = w
                while (c < W && S[h][c] == DOT) c++
                val sum = c - w
                while (w < c) WW[h][w++] = sum
            } else w++
        }
    }
    for (w in 0 until W) {
        var h = 0
        while (h < H) {
            if (S[h][w] == DOT) {
                var c = h
                while (c < H && S[c][w] == DOT) c++
                val sum = c - h
                while (h < c) HH[h++][w] = sum
            } else h++
        }
    }
  //WW.print()
  //HH.print()
    var ans = 0
    for (h in 0 until H)
        for (w in 0 until W)
            ans = Math.max(ans, WW[h][w] + HH[h][w] - 1)
    println(ans)
}
fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map(String::toInt)
fun Array<IntArray>.print(title: String = "") {
    System.err.println(if (title.length > 0) title else this)
    for ((index, array) in this.withIndex()) {
        System.err.print("[${index}] ")
        System.err.println(array.joinToString(separator = ", "))
    }
}