h, w = map(int, input().split())
s = []
for _ in range(h):
    s.append(input())
r = [[0]*w for _ in range(h)]
for i in range(h):
    flg = False
    for j in range(w):
        if s[i][j]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[i][j]=='#':
            for k in range(begin, j):
                r[i][k] = tmp
            flg = False
    if flg:
        for k in range(begin, w):
            r[i][k] = tmp
c = [[0]*w for _ in range(h)]
for i in range(w):
    flg = False
    for j in range(h):
        if s[j][i]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[j][i]=='#':
            for k in range(begin, j):
                c[k][i] = tmp
            flg = False
    if flg:
        for k in range(begin, h):
            c[k][i] = tmp
ans = 0
for row1, row2 in zip(r, c):
    for e1, e2 in zip(row1, row2):
        if ans<e1+e2-1:
            ans = e1+e2-1
print(ans) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w s = [] s [] for _ in range(h):
    s.append(input()) _ range(h) range h s.append(input()) s.append s append input() input [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w r = [[0]*w for _ in range(h)] r [[0]*w for _ in range(h)] for i in range(h):
    flg = False
    for j in range(w):
        if s[i][j]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[i][j]=='#':
            for k in range(begin, j):
                r[i][k] = tmp
            flg = False
    if flg:
        for k in range(begin, w):
            r[i][k] = tmp i range(h) range h flg = False flg False for j in range(w):
        if s[i][j]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[i][j]=='#':
            for k in range(begin, j):
                r[i][k] = tmp
            flg = False
     j range(w) range w if s[i][j]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
         s[i][j]=='.' s[i][j] [i] s i j '.' if not flg:
                tmp = 0
                begin = j
                flg = True
             not flg flg tmp = 0 tmp 0 begin = j begin j flg = True flg True tmp += 1 tmp 1 if flg and s[i][j]=='#':
            for k in range(begin, j):
                r[i][k] = tmp
            flg = False
     flg and s[i][j]=='#' flg s[i][j]=='#' s[i][j] [i] s i j '#' for k in range(begin, j):
                r[i][k] = tmp
             k range(begin, j) range begin j r[i][k] = tmp r[i][k] [i] r i k tmp flg = False flg False if flg:
        for k in range(begin, w):
            r[i][k] = tmp flg for k in range(begin, w):
            r[i][k] = tmp k range(begin, w) range begin w r[i][k] = tmp r[i][k] [i] r i k tmp [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w c = [[0]*w for _ in range(h)] c [[0]*w for _ in range(h)] for i in range(w):
    flg = False
    for j in range(h):
        if s[j][i]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[j][i]=='#':
            for k in range(begin, j):
                c[k][i] = tmp
            flg = False
    if flg:
        for k in range(begin, h):
            c[k][i] = tmp i range(w) range w flg = False flg False for j in range(h):
        if s[j][i]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[j][i]=='#':
            for k in range(begin, j):
                c[k][i] = tmp
            flg = False
     j range(h) range h if s[j][i]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
         s[j][i]=='.' s[j][i] [j] s j i '.' if not flg:
                tmp = 0
                begin = j
                flg = True
             not flg flg tmp = 0 tmp 0 begin = j begin j flg = True flg True tmp += 1 tmp 1 if flg and s[j][i]=='#':
            for k in range(begin, j):
                c[k][i] = tmp
            flg = False
     flg and s[j][i]=='#' flg s[j][i]=='#' s[j][i] [j] s j i '#' for k in range(begin, j):
                c[k][i] = tmp
             k range(begin, j) range begin j c[k][i] = tmp c[k][i] [k] c k i tmp flg = False flg False if flg:
        for k in range(begin, h):
            c[k][i] = tmp flg for k in range(begin, h):
            c[k][i] = tmp k range(begin, h) range begin h c[k][i] = tmp c[k][i] [k] c k i tmp ans = 0 ans 0 for row1, row2 in zip(r, c):
    for e1, e2 in zip(row1, row2):
        if ans<e1+e2-1:
            ans = e1+e2-1 row1 row2 zip(r, c) zip r c for e1, e2 in zip(row1, row2):
        if ans<e1+e2-1:
            ans = e1+e2-1 e1 e2 zip(row1, row2) zip row1 row2 if ans<e1+e2-1:
            ans = e1+e2-1 ans<e1+e2-1 ans e1+e2-1 e1+e2 e1 e2 1 ans = e1+e2-1 ans e1+e2-1 e1+e2 e1 e2 1 print(ans) print ans tmp += 1 1 tmp ans = e1+e2-1 e1+e2-1 ans s = [] [] s flg = True True flg begin = j j begin ans = 0 0 ans h, w = map(int, input().split()) map(int, input().split()) h begin = j j begin tmp += 1 1 tmp flg = False False flg flg = False False flg w = map(int, input().split()) map(int, input().split()) w r = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] r tmp = 0 0 tmp flg = False False flg c = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] c flg = False False flg tmp = 0 0 tmp flg = True True flg
h, w = map(int, input().split())
s = []
for _ in range(h):
    s.append(input())
r = [[0]*w for _ in range(h)]
for i in range(h):
    flg = False
    for j in range(w):
        if s[i][j]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[i][j]=='#':
            for k in range(begin, j):
                r[i][k] = tmp
            flg = False
    if flg:
        for k in range(begin, w):
            r[i][k] = tmp
c = [[0]*w for _ in range(h)]
for i in range(w):
    flg = False
    for j in range(h):
        if s[j][i]=='.':
            if not flg:
                tmp = 0
                begin = j
                flg = True
            tmp += 1
        if flg and s[j][i]=='#':
            for k in range(begin, j):
                c[k][i] = tmp
            flg = False
    if flg:
        for k in range(begin, h):
            c[k][i] = tmp
ans = 0
for row1, row2 in zip(r, c):
    for e1, e2 in zip(row1, row2):
        if ans<e1+e2-1:
            ans = e1+e2-1
print(ans)