import sys
input = sys.stdin.readline

H, W = map(int, input().split())
S = [input() for _ in range(H)]

X = [[0]*W for _ in range(H)]
Y = [[0]*W for _ in range(H)]

for h in range(H):
    cnt = 0
    l = 0
    for w in range(W):
        if S[h][w] == '.':
            cnt += 1
        else:
            for x in range(l, w):
                X[h][x] = cnt
            l = w+1
            cnt = 0
    for x in range(l, W):
        X[h][x] = cnt

for w in range(W):
    cnt = 0
    u = 0
    for h in range(H):
        if S[h][w] == '.':
            cnt += 1
        else:
            for y in range(u, h):
                Y[y][w] = cnt
            u = h+1
            cnt = 0
    for y in range(u, H):
        Y[y][w] = cnt

ans = 0
for h in range(H):
    for w in range(W):
        if S[h][w] == '#':
            continue
        ans = max(ans, X[h][w] + Y[h][w] - 1)
print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline 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)] [0]*W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0]*W [0] 0 W X = [[0]*W for _ in range(H)] X [[0]*W for _ in range(H)] [0]*W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0]*W [0] 0 W Y = [[0]*W for _ in range(H)] Y [[0]*W for _ in range(H)] for h in range(H):
    cnt = 0
    l = 0
    for w in range(W):
        if S[h][w] == '.':
            cnt += 1
        else:
            for x in range(l, w):
                X[h][x] = cnt
            l = w+1
            cnt = 0
    for x in range(l, W):
        X[h][x] = cnt h range(H) range H cnt = 0 cnt 0 l = 0 l 0 for w in range(W):
        if S[h][w] == '.':
            cnt += 1
        else:
            for x in range(l, w):
                X[h][x] = cnt
            l = w+1
            cnt = 0
     w range(W) range W if S[h][w] == '.':
            cnt += 1
        else:
            for x in range(l, w):
                X[h][x] = cnt
            l = w+1
            cnt = 0
     S[h][w] == '.' S[h][w] [h] S h w '.' cnt += 1 cnt 1 for x in range(l, w):
                X[h][x] = cnt
             x range(l, w) range l w X[h][x] = cnt X[h][x] [h] X h x cnt l = w+1 l w+1 w 1 cnt = 0 cnt 0 for x in range(l, W):
        X[h][x] = cnt x range(l, W) range l W X[h][x] = cnt X[h][x] [h] X h x cnt for w in range(W):
    cnt = 0
    u = 0
    for h in range(H):
        if S[h][w] == '.':
            cnt += 1
        else:
            for y in range(u, h):
                Y[y][w] = cnt
            u = h+1
            cnt = 0
    for y in range(u, H):
        Y[y][w] = cnt w range(W) range W cnt = 0 cnt 0 u = 0 u 0 for h in range(H):
        if S[h][w] == '.':
            cnt += 1
        else:
            for y in range(u, h):
                Y[y][w] = cnt
            u = h+1
            cnt = 0
     h range(H) range H if S[h][w] == '.':
            cnt += 1
        else:
            for y in range(u, h):
                Y[y][w] = cnt
            u = h+1
            cnt = 0
     S[h][w] == '.' S[h][w] [h] S h w '.' cnt += 1 cnt 1 for y in range(u, h):
                Y[y][w] = cnt
             y range(u, h) range u h Y[y][w] = cnt Y[y][w] [y] Y y w cnt u = h+1 u h+1 h 1 cnt = 0 cnt 0 for y in range(u, H):
        Y[y][w] = cnt y range(u, H) range u H Y[y][w] = cnt Y[y][w] [y] Y y w cnt ans = 0 ans 0 for h in range(H):
    for w in range(W):
        if S[h][w] == '#':
            continue
        ans = max(ans, X[h][w] + Y[h][w] - 1) h range(H) range H for w in range(W):
        if S[h][w] == '#':
            continue
        ans = max(ans, X[h][w] + Y[h][w] - 1) w range(W) range W if S[h][w] == '#':
            continue
         S[h][w] == '#' S[h][w] [h] S h w '#' continue ans = max(ans, X[h][w] + Y[h][w] - 1) ans max(ans, X[h][w] + Y[h][w] - 1) max ans X[h][w] + Y[h][w] - 1 X[h][w] + Y[h][w] X[h][w] [h] X h w Y[h][w] [h] Y h w 1 print(ans) print ans input = sys.stdin.readline sys.stdin.readline input cnt = 0 0 cnt X = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] X cnt = 0 0 cnt cnt = 0 0 cnt l = w+1 w+1 l cnt += 1 1 cnt Y = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] Y cnt += 1 1 cnt l = 0 0 l S = [input() for _ in range(H)] [input() for _ in range(H)] S W = map(int, input().split()) map(int, input().split()) W cnt = 0 0 cnt u = 0 0 u ans = max(ans, X[h][w] + Y[h][w] - 1) max(ans, X[h][w] + Y[h][w] - 1) ans u = h+1 h+1 u H, W = map(int, input().split()) map(int, input().split()) H ans = 0 0 ans
import sys
input = sys.stdin.readline

H, W = map(int, input().split())
S = [input() for _ in range(H)]

X = [[0]*W for _ in range(H)]
Y = [[0]*W for _ in range(H)]

for h in range(H):
    cnt = 0
    l = 0
    for w in range(W):
        if S[h][w] == '.':
            cnt += 1
        else:
            for x in range(l, w):
                X[h][x] = cnt
            l = w+1
            cnt = 0
    for x in range(l, W):
        X[h][x] = cnt

for w in range(W):
    cnt = 0
    u = 0
    for h in range(H):
        if S[h][w] == '.':
            cnt += 1
        else:
            for y in range(u, h):
                Y[y][w] = cnt
            u = h+1
            cnt = 0
    for y in range(u, H):
        Y[y][w] = cnt

ans = 0
for h in range(H):
    for w in range(W):
        if S[h][w] == '#':
            continue
        ans = max(ans, X[h][w] + Y[h][w] - 1)
print(ans)
