h, w = map(int, input().split())
s = [input() for _ in range(h)]
sy = [0] * w
ret = 0
for y in range(h):
    seqx = 0
    seqy = 0
    for x in range(w):
        if s[y][x] == '.':
            if sy[x] == 0:
                yy = y
                while yy < h and s[yy][x] != '#':
                    yy += 1
                sy[x] = yy - y
            seqx += 1
            seqy = max(seqy, sy[x])
            ret = max(ret, seqx + seqy - 1)
        else:
            seqx = 0
            seqy = 0
            sy[x] = 0
print(ret) 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)] sy = [0] * w sy [0] * w [0] 0 w ret = 0 ret 0 for y in range(h):
    seqx = 0
    seqy = 0
    for x in range(w):
        if s[y][x] == '.':
            if sy[x] == 0:
                yy = y
                while yy < h and s[yy][x] != '#':
                    yy += 1
                sy[x] = yy - y
            seqx += 1
            seqy = max(seqy, sy[x])
            ret = max(ret, seqx + seqy - 1)
        else:
            seqx = 0
            seqy = 0
            sy[x] = 0 y range(h) range h seqx = 0 seqx 0 seqy = 0 seqy 0 for x in range(w):
        if s[y][x] == '.':
            if sy[x] == 0:
                yy = y
                while yy < h and s[yy][x] != '#':
                    yy += 1
                sy[x] = yy - y
            seqx += 1
            seqy = max(seqy, sy[x])
            ret = max(ret, seqx + seqy - 1)
        else:
            seqx = 0
            seqy = 0
            sy[x] = 0 x range(w) range w if s[y][x] == '.':
            if sy[x] == 0:
                yy = y
                while yy < h and s[yy][x] != '#':
                    yy += 1
                sy[x] = yy - y
            seqx += 1
            seqy = max(seqy, sy[x])
            ret = max(ret, seqx + seqy - 1)
        else:
            seqx = 0
            seqy = 0
            sy[x] = 0 s[y][x] == '.' s[y][x] [y] s y x '.' if sy[x] == 0:
                yy = y
                while yy < h and s[yy][x] != '#':
                    yy += 1
                sy[x] = yy - y
             sy[x] == 0 sy[x] sy x 0 yy = y yy y while yy < h and s[yy][x] != '#':
                    yy += 1
                 yy < h and s[yy][x] != '#' yy < h yy h s[yy][x] != '#' s[yy][x] [yy] s yy x '#' yy += 1 yy 1 sy[x] = yy - y sy[x] sy x yy - y yy y seqx += 1 seqx 1 seqy = max(seqy, sy[x]) seqy max(seqy, sy[x]) max seqy sy[x] sy x ret = max(ret, seqx + seqy - 1) ret max(ret, seqx + seqy - 1) max ret seqx + seqy - 1 seqx + seqy seqx seqy 1 seqx = 0 seqx 0 seqy = 0 seqy 0 sy[x] = 0 sy[x] sy x 0 print(ret) print ret seqx += 1 1 seqx seqy = max(seqy, sy[x]) max(seqy, sy[x]) seqy seqy = 0 0 seqy h, w = map(int, input().split()) map(int, input().split()) h w = map(int, input().split()) map(int, input().split()) w seqx = 0 0 seqx s = [input() for _ in range(h)] [input() for _ in range(h)] s sy = [0] * w [0] * w sy seqx = 0 0 seqx seqy = 0 0 seqy yy = y y yy ret = 0 0 ret yy += 1 1 yy ret = max(ret, seqx + seqy - 1) max(ret, seqx + seqy - 1) ret
h, w = map(int, input().split())
s = [input() for _ in range(h)]
sy = [0] * w
ret = 0
for y in range(h):
    seqx = 0
    seqy = 0
    for x in range(w):
        if s[y][x] == '.':
            if sy[x] == 0:
                yy = y
                while yy < h and s[yy][x] != '#':
                    yy += 1
                sy[x] = yy - y
            seqx += 1
            seqy = max(seqy, sy[x])
            ret = max(ret, seqx + seqy - 1)
        else:
            seqx = 0
            seqy = 0
            sy[x] = 0
print(ret)
