Buggy python submission (verdict: Time Limit Exceeded):
import sys

from collections import deque
# q = deque(); q.append(x); q.appendleft(x); q.pop() -> x; q.popleft() -> x
from collections import defaultdict
# d = defaultdict(lambda: []); d[key] -> []
import heapq
# hq = []; heapq.heappush(hq, x); heapq.heappop(hq) -> x; heapq.heappushpop(hq, x) -> x
import bisect
# i = bisect.bisect_left([1,2,3,4], 1.5); i = bisect.bisect_right([4,3,2,1], 1.5)

#import numpy as np
#from scipy.misc import comb

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H, W = i2nn()
    SS = ii2ss(H)
    D = [[0] * W for _ in range(H)]
    for i in range(H):
        c = 0
        j0 = 0
        for j in range(W):
            s = SS[i][j]
            if s == '.':
                c += 1
            else:
                for k in range(j0, j):
                    D[i][k] += c
                c = 0
                j0 = j + 1
        for k in range(j0, W):
            D[i][k] += c
    #print(D)
    for j in range(W):
        c = 0
        i0 = 0
        for i in range(H):
            s = SS[i][j]
            if s == '.':
                c += 1
            else:
                for k in range(i0, i):
                    D[k][j] += c
                c = 0
                i0 = i + 1
        for k in range(i0, H):
            D[k][j] += c
    #print(D)
    n = 0
    for d in D:
        t = max(d)
        if t > n:
            n = t
    print(n-1)

main()


Fixed submission:
import sys

from collections import deque
# q = deque(); q.append(x); q.appendleft(x); q.pop() -> x; q.popleft() -> x
from collections import defaultdict
# d = defaultdict(lambda: []); d[key] -> []
import heapq
# hq = []; heapq.heappush(hq, x); heapq.heappop(hq) -> x; heapq.heappushpop(hq, x) -> x
import bisect
# i = bisect.bisect_left([1,2,3,4], 1.5); i = bisect.bisect_right([4,3,2,1], 1.5)

#import numpy as np
#from scipy.misc import comb

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H, W = i2nn()
    SS = ii2ss(H)
    D = [[0] * W for _ in range(H)]
    for i in range(H):
        c = 0
        j0 = 0
        for j in range(W):
            s = SS[i][j]
            if s == '.':
                c += 1
            else:
                for k in range(j0, j):
                    D[i][k] += c
                c = 0
                j0 = j + 1
        for k in range(j0, W):
            D[i][k] += c
    #print(D)
    for j in range(W):
        c = 0
        i0 = 0
        for i in range(H):
            s = SS[i][j]
            if s == '.':
                c += 1
            else:
                for k in range(i0, i):
                    D[k][j] += c
                c = 0
                i0 = i + 1
        for k in range(i0, H):
            D[k][j] += c
    #print(D)
    n = 0
    for d in D:
        t = max(d)
        if t > n:
            n = t
    print(n-1)

main()