Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

### TESTCASE
test = ""
#test = \
"""
4 6
#..#..
.....#
....#.
#.#...
ans 8
"""

"""
8 8
..#...#.
....#...
##......
..###..#
...#..#.
##....#.
#...#...
###.#..#
ans 13
"""
############
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
####### MAIN

h, w = map(int, input2().split())
s = [["#"] * (w+1)]
s += [list("#" + input2()) for _ in range(h)]

ws = [[0] * (w+1) for _ in range(h+1)]
hs = [[0] * (w+1) for _ in range(h+1)]

for hi in range(1, h+1):
    for wi in range(1, w+1):
        if s[hi][wi] == ".":
            ws[hi][wi] = ws[hi][wi-1] + 1
            hs[hi][wi] = hs[hi-1][wi] + 1

for hi in range(1, h+1):
    for wi in range(w-1, 0, -1):
        if ws[hi][wi]:
            ws[hi][wi] = max(ws[hi][wi+1], ws[hi][wi])
            
for wi in range(1, w+1):
    for hi in range(h-1, 0, -1):
        if hs[hi][wi]:
            hs[hi][wi] = max(hs[hi+1][wi], hs[hi][wi])           

print(max([ws[hi][wi] + hs[hi][wi] 
for hi in range(1, h+1) 
for wi in range(1, w+1)]) - 1)



Fixed submission:
# -*- coding: utf-8 -*-

import numpy as np

### TESTCASE
test = ""
#test = \
"""
4 6
#..#..
.....#
....#.
#.#...
ans 8
"""

"""
8 8
..#...#.
....#...
##......
..###..#
...#..#.
##....#.
#...#...
###.#..#
ans 13
"""
############
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
####### MAIN

h, w = map(int, input2().split())
s = [["#"] * (w+1)]
s += [list("#" + input2()) for _ in range(h)]
s = np.array(s)

hs = np.zeros((h+1, w+1), dtype="int64")
ws = np.zeros((h+1, w+1), dtype="int64")

for hi in range(1, h+1):
    htmp = np.array(s[hi] == ".", dtype="int")
    hs[hi] = hs[hi-1] * htmp + htmp
    
for hj in range(h-1, 0, -1):
    hs[hj] = np.maximum(hs[hj], np.minimum(hs[hj+1], hs[hj] * hs[hj+1]))
    
for wi in range(1, w+1):
    wtmp = np.array(s[:, wi] == ".", dtype="int")
    ws[:, wi] = ws[:, wi-1] * wtmp + wtmp
    
for wj in range(w-1, 0, -1):
    ws[:, wj] = np.maximum(ws[:, wj], 
      np.minimum(ws[:, wj+1], ws[:, wj] * ws[:, wj+1]))
    
print(np.max(ws + hs) - 1)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import numpy as np

### TESTCASE
test = ""
#test = \
"""
4 6
#..#..
.....#
....#.
#.#...
ans 8
"""

"""
8 8
..#...#.
....#...
##......
..###..#
...#..#.
##....#.
#...#...
###.#..#
ans 13
"""
############
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
####### MAIN

h, w = map(int, input2().split())
s = [["#"] * (w+1)]
s += [list("#" + input2()) for _ in range(h)]

ws = [[0] * (w+1) for _ in range(h+1)]  # Pythonの恐ろしい仕様！
hs = [[0] * (w+1) for _ in range(h+1)]

for hi in range(1, h+1):
    for wi in range(1, w+1):
        if s[hi][wi] == ".":
            ws[hi][wi] = ws[hi][wi-1] + 1
            hs[hi][wi] = hs[hi-1][wi] + 1

for hi in range(1, h+1):
    for wi in range(w-1, 0, -1):
        if ws[hi][wi]:
            ws[hi][wi] = max(ws[hi][wi+1], ws[hi][wi])
            
for wi in range(1, w+1):
    for hi in range(h-1, 0, -1):
        if hs[hi][wi]:
            hs[hi][wi] = max(hs[hi+1][wi], hs[hi][wi])           
            
ws = np.array(ws)
hs = np.array(hs)

print(np.max(ws + hs) - 1)




Fixed submission:
# -*- coding: utf-8 -*-

import numpy as np

### TESTCASE
test = ""
#test = \
"""
4 6
#..#..
.....#
....#.
#.#...
ans 8
"""

"""
8 8
..#...#.
....#...
##......
..###..#
...#..#.
##....#.
#...#...
###.#..#
ans 13
"""
############
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
####### MAIN

h, w = map(int, input2().split())
s = [["#"] * (w+1)]
s += [list("#" + input2()) for _ in range(h)]
s = np.array(s)

hs = np.zeros((h+1, w+1), dtype="int64")
ws = np.zeros((h+1, w+1), dtype="int64")

for hi in range(1, h+1):
    htmp = np.array(s[hi] == ".", dtype="int")
    hs[hi] = hs[hi-1] * htmp + htmp
    
for hj in range(h-1, 0, -1):
    hs[hj] = np.maximum(hs[hj], np.minimum(hs[hj+1], hs[hj] * hs[hj+1]))
    
for wi in range(1, w+1):
    wtmp = np.array(s[:, wi] == ".", dtype="int")
    ws[:, wi] = ws[:, wi-1] * wtmp + wtmp
    
for wj in range(w-1, 0, -1):
    ws[:, wj] = np.maximum(ws[:, wj], 
      np.minimum(ws[:, wj+1], ws[:, wj] * ws[:, wj+1]))
    
print(np.max(ws + hs) - 1)