h,w = map(int,input().split())
s = [0] * h
for i in range(h):
    s[i] = [i for i in str(input())]
ans = [[0] * w for i in range(h)]

for i in range(h):
    box = []
    a = 0
    for j in range(w):
        if s[i][j] == '.':
            box.append(j)
            a += 1
            if j == w-1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0

for i in range(w):
    box = []
    a = 0
    for j in range(h):
        if s[j][i] == '.':
            box.append(j)
            a += 1
            if j == h-1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
aans = 0
for i in range(h):
    aans = max(aans,max(ans[i]))
print(aans-1)
 h,w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w s = [0] * h s [0] * h [0] 0 h for i in range(h):
    s[i] = [i for i in str(input())] i range(h) range h i for i in str(input()) for i in str(input()) i str(input()) str input() input for i in str(input()) i s[i] = [i for i in str(input())] s[i] s i [i for i in str(input())] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w ans = [[0] * w for i in range(h)] ans [[0] * w for i in range(h)] for i in range(h):
    box = []
    a = 0
    for j in range(w):
        if s[i][j] == '.':
            box.append(j)
            a += 1
            if j == w-1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0 i range(h) range h box = [] box [] a = 0 a 0 for j in range(w):
        if s[i][j] == '.':
            box.append(j)
            a += 1
            if j == w-1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0 j range(w) range w if s[i][j] == '.':
            box.append(j)
            a += 1
            if j == w-1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0 s[i][j] == '.' s[i][j] [i] s i j '.' box.append(j) box.append box append j a += 1 a 1 if j == w-1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0
         j == w-1 j w-1 w 1 for k in range(len(box)):
                    ans[i][box[k]] += a
                 k range(len(box)) range len(box) len box ans[i][box[k]] += a ans[i][box[k]] [i] ans i box[k] box k a box = [] box [] a = 0 a 0 if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0 j != 0 and len(box) >= 1 j != 0 j 0 len(box) >= 1 len(box) len box 1 for k in range(len(box)):
                    ans[i][box[k]] += a
                 k range(len(box)) range len(box) len box ans[i][box[k]] += a ans[i][box[k]] [i] ans i box[k] box k a box = [] box [] a = 0 a 0 for i in range(w):
    box = []
    a = 0
    for j in range(h):
        if s[j][i] == '.':
            box.append(j)
            a += 1
            if j == h-1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0 i range(w) range w box = [] box [] a = 0 a 0 for j in range(h):
        if s[j][i] == '.':
            box.append(j)
            a += 1
            if j == h-1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0 j range(h) range h if s[j][i] == '.':
            box.append(j)
            a += 1
            if j == h-1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0 s[j][i] == '.' s[j][i] [j] s j i '.' box.append(j) box.append box append j a += 1 a 1 if j == h-1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
         j == h-1 j h-1 h 1 for k in range(len(box)):
                    ans[box[k]][i] += a
                 k range(len(box)) range len(box) len box ans[box[k]][i] += a ans[box[k]][i] [box[k]] ans box[k] box k i a box = [] box [] a = 0 a 0 if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0 j != 0 and len(box) >= 1 j != 0 j 0 len(box) >= 1 len(box) len box 1 for k in range(len(box)):
                    ans[box[k]][i] += a
                 k range(len(box)) range len(box) len box ans[box[k]][i] += a ans[box[k]][i] [box[k]] ans box[k] box k i a box = [] box [] a = 0 a 0 aans = 0 aans 0 for i in range(h):
    aans = max(aans,max(ans[i])) i range(h) range h aans = max(aans,max(ans[i])) aans max(aans,max(ans[i])) max aans max(ans[i]) max ans[i] ans i print(aans-1) print aans-1 aans 1 a = 0 0 a a += 1 1 a box = [] [] box a = 0 0 a s = [0] * h [0] * h s box = [] [] box ans = [[0] * w for i in range(h)] [[0] * w for i in range(h)] ans box = [] [] box aans = max(aans,max(ans[i])) max(aans,max(ans[i])) aans w = map(int,input().split()) map(int,input().split()) w a = 0 0 a a = 0 0 a h,w = map(int,input().split()) map(int,input().split()) h a = 0 0 a box = [] [] box box = [] [] box a += 1 1 a aans = 0 0 aans box = [] [] box a = 0 0 a
h,w = map(int,input().split())
s = [0] * h
for i in range(h):
    s[i] = [i for i in str(input())]
ans = [[0] * w for i in range(h)]

for i in range(h):
    box = []
    a = 0
    for j in range(w):
        if s[i][j] == '.':
            box.append(j)
            a += 1
            if j == w-1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[i][box[k]] += a
                box = []
                a = 0

for i in range(w):
    box = []
    a = 0
    for j in range(h):
        if s[j][i] == '.':
            box.append(j)
            a += 1
            if j == h-1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
        else:
            if j != 0 and len(box) >= 1:
                for k in range(len(box)):
                    ans[box[k]][i] += a
                box = []
                a = 0
aans = 0
for i in range(h):
    aans = max(aans,max(ans[i]))
print(aans-1)

