import sys
import math  # noqa
import bisect  # noqa
import queue  # noqa


def input():
    return sys.stdin.readline().rstrip()


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

    hori = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

    vert = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

    ans = 0
    for i in range(H):
        for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

    print(ans)


if __name__ == '__main__':
    main() import sys sys import math math import bisect bisect import queue queue def input():
    return sys.stdin.readline().rstrip() input return sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    H, W = map(int, input().split())
    S = [[s for s in input()] for _ in range(H)]

    hori = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

    vert = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

    ans = 0
    for i in range(H):
        for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

    print(ans) main H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W [s for s in input()] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [s for s in input()] S = [[s for s in input()] for _ in range(H)] S [[s for s in input()] for _ in range(H)] [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] hori = [[0 for _ in range(W)] for _ in range(H)] hori [[0 for _ in range(W)] for _ in range(H)] for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

     i range(H) range H cnt = 0 cnt 0 for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
         j range(W) range W if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
         S[i][j] == '.' S[i][j] [i] S i j '.' cnt += 1 cnt 1 hori[i][j] = cnt hori[i][j] [i] hori i j cnt cnt = 0 cnt 0 res = 0 res 0 for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

     j range(W - 1, -1, -1) range W - 1 W 1 -1 -1 if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

     S[i][j] == '.' S[i][j] [i] S i j '.' res = max(res, hori[i][j]) res max(res, hori[i][j]) max res hori[i][j] [i] hori i j hori[i][j] = res hori[i][j] [i] hori i j res res = 0 res 0 [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] vert = [[0 for _ in range(W)] for _ in range(H)] vert [[0 for _ in range(W)] for _ in range(H)] for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

     i range(W) range W cnt = 0 cnt 0 for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
         j range(H) range H if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
         S[j][i] == '.' S[j][i] [j] S j i '.' cnt += 1 cnt 1 vert[j][i] = cnt vert[j][i] [j] vert j i cnt cnt = 0 cnt 0 res = 0 res 0 for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

     j range(H - 1, -1, -1) range H - 1 H 1 -1 -1 if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

     S[j][i] == '.' S[j][i] [j] S j i '.' res = max(res, vert[j][i]) res max(res, vert[j][i]) max res vert[j][i] [j] vert j i vert[j][i] = res vert[j][i] [j] vert j i res res = 0 res 0 ans = 0 ans 0 for i in range(H):
        for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

     i range(H) range H for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

     j range(W) range W if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

     S[i][j] == '.' S[i][j] [i] S i j '.' ans = max(ans, hori[i][j] + vert[i][j] - 1) ans max(ans, hori[i][j] + vert[i][j] - 1) max ans hori[i][j] + vert[i][j] - 1 hori[i][j] + vert[i][j] hori[i][j] [i] hori i j vert[i][j] [i] vert i j 1 print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def input():
    return sys.stdin.readline().rstrip() def input():
    return sys.stdin.readline().rstrip() input def main():
    H, W = map(int, input().split())
    S = [[s for s in input()] for _ in range(H)]

    hori = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

    vert = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

    ans = 0
    for i in range(H):
        for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

    print(ans) def main():
    H, W = map(int, input().split())
    S = [[s for s in input()] for _ in range(H)]

    hori = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

    vert = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

    ans = 0
    for i in range(H):
        for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

    print(ans) main
import sys
import math  # noqa
import bisect  # noqa
import queue  # noqa


def input():
    return sys.stdin.readline().rstrip()


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

    hori = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                hori[i][j] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '.':
                res = max(res, hori[i][j])
                hori[i][j] = res
            else:
                res = 0

    vert = [[0 for _ in range(W)] for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                vert[j][i] = cnt
            else:
                cnt = 0
        res = 0
        for j in range(H - 1, -1, -1):
            if S[j][i] == '.':
                res = max(res, vert[j][i])
                vert[j][i] = res
            else:
                res = 0

    ans = 0
    for i in range(H):
        for j in range(W):
            if S[i][j] == '.':
                ans = max(ans, hori[i][j] + vert[i][j] - 1)

    print(ans)


if __name__ == '__main__':
    main()
