H, W = map(int, input().split(' '))

S = [input() for _ in range(H)]

rows = []
cols = []

for y in range(H):
    cont = 0
    row = []
    for x in range(W):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                row.append(cont)
            row.append(0)
            cont = 0
    for _ in range(cont):
        row.append(cont)
    rows.append(row)

for x in range(W):
    cont = 0
    col = []
    for y in range(H):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                col.append(cont)
            col.append(0)
            cont = 0
    for _ in range(cont):
        col.append(cont)
    cols.append(col)

ans = 0
for y in range(H):
    for x in range(W):
        if S[y][x] == '.':
            ans = max(ans, rows[y][x] + cols[x][y] - 1)

print(ans) H, W = map(int, input().split(' ')) H map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' W input() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) input() input S = [input() for _ in range(H)] S [input() for _ in range(H)] rows = [] rows [] cols = [] cols [] for y in range(H):
    cont = 0
    row = []
    for x in range(W):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                row.append(cont)
            row.append(0)
            cont = 0
    for _ in range(cont):
        row.append(cont)
    rows.append(row) y range(H) range H cont = 0 cont 0 row = [] row [] for x in range(W):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                row.append(cont)
            row.append(0)
            cont = 0
     x range(W) range W if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                row.append(cont)
            row.append(0)
            cont = 0
     S[y][x] == '.' S[y][x] [y] S y x '.' cont += 1 cont 1 for _ in range(cont):
                row.append(cont)
             _ range(cont) range cont row.append(cont) row.append row append cont row.append(0) row.append row append 0 cont = 0 cont 0 for _ in range(cont):
        row.append(cont)
     _ range(cont) range cont row.append(cont) row.append row append cont rows.append(row) rows.append rows append row for x in range(W):
    cont = 0
    col = []
    for y in range(H):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                col.append(cont)
            col.append(0)
            cont = 0
    for _ in range(cont):
        col.append(cont)
    cols.append(col) x range(W) range W cont = 0 cont 0 col = [] col [] for y in range(H):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                col.append(cont)
            col.append(0)
            cont = 0
     y range(H) range H if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                col.append(cont)
            col.append(0)
            cont = 0
     S[y][x] == '.' S[y][x] [y] S y x '.' cont += 1 cont 1 for _ in range(cont):
                col.append(cont)
             _ range(cont) range cont col.append(cont) col.append col append cont col.append(0) col.append col append 0 cont = 0 cont 0 for _ in range(cont):
        col.append(cont)
     _ range(cont) range cont col.append(cont) col.append col append cont cols.append(col) cols.append cols append col ans = 0 ans 0 for y in range(H):
    for x in range(W):
        if S[y][x] == '.':
            ans = max(ans, rows[y][x] + cols[x][y] - 1) y range(H) range H for x in range(W):
        if S[y][x] == '.':
            ans = max(ans, rows[y][x] + cols[x][y] - 1) x range(W) range W if S[y][x] == '.':
            ans = max(ans, rows[y][x] + cols[x][y] - 1) S[y][x] == '.' S[y][x] [y] S y x '.' ans = max(ans, rows[y][x] + cols[x][y] - 1) ans max(ans, rows[y][x] + cols[x][y] - 1) max ans rows[y][x] + cols[x][y] - 1 rows[y][x] + cols[x][y] rows[y][x] [y] rows y x cols[x][y] [x] cols x y 1 print(ans) print ans cont = 0 0 cont cont += 1 1 cont ans = 0 0 ans cols = [] [] cols cont = 0 0 cont S = [input() for _ in range(H)] [input() for _ in range(H)] S cont += 1 1 cont cont = 0 0 cont rows = [] [] rows cont = 0 0 cont H, W = map(int, input().split(' ')) map(int, input().split(' ')) H W = map(int, input().split(' ')) map(int, input().split(' ')) W row = [] [] row col = [] [] col ans = max(ans, rows[y][x] + cols[x][y] - 1) max(ans, rows[y][x] + cols[x][y] - 1) ans
H, W = map(int, input().split(' '))

S = [input() for _ in range(H)]

rows = []
cols = []

for y in range(H):
    cont = 0
    row = []
    for x in range(W):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                row.append(cont)
            row.append(0)
            cont = 0
    for _ in range(cont):
        row.append(cont)
    rows.append(row)

for x in range(W):
    cont = 0
    col = []
    for y in range(H):
        if S[y][x] == '.':
            cont += 1
        else:
            for _ in range(cont):
                col.append(cont)
            col.append(0)
            cont = 0
    for _ in range(cont):
        col.append(cont)
    cols.append(col)

ans = 0
for y in range(H):
    for x in range(W):
        if S[y][x] == '.':
            ans = max(ans, rows[y][x] + cols[x][y] - 1)

print(ans)
