import java.util.*

object MainKt {
	@JvmStatic
	fun main(args: Array<String>) {
		val scanner = Scanner(System.`in`)
		val h = scanner.nextInt()
		val w = scanner.nextInt()
		val data = Array(h, {IntArray(w)})
		val begVs = IntArray(w, {-1})
		var max = 0
		for (i in 0..h-1){
			val s = scanner.next().toCharArray()
			var beg = -1
			for (k in 0..w-1){
				val c = s[k]
				if (c=='#') {
					if (beg!=-1){
						val d=k-beg
						for (j in beg..k-1) {
							data[i][j]+=d
							max = Math.max(max, data[i][j])
						}
						beg=-1
					}
					if (begVs[k]!=-1){
						val d=i-begVs[k]
						for (j in begVs[k]..i-1) {
							data[j][k]+=d
							max = Math.max(max, data[j][k])
						}
						begVs[k]=-1
					}
					data[i][k]=0
				}else {
					if (beg==-1) beg = k
					if (begVs[k]==-1) begVs[k]=i
				}
			}
			if(beg!=-1){
				val d = w-beg
				for (j in beg..w-1) {
					data[i][j]+=d
					max = Math.max(max, data[i][j])
				}
			}
		}
		for (k in 0..w-1){
			if (begVs[k]!=-1){
				val d = h-begVs[k]
				for (j in begVs[k]..h-1) {
					data[j][k]+=d
					max = Math.max(max, data[j][k])
				}
			}
		}

		println(if (max==0) 0 else max-1)
	}
}