def m():
    H, W = map(int, input().split())
    S = [list(input()) for _ in range(H)]
    Gx = [[-1 for _ in range(W)] for _ in range(H)]
    Gy = [[-1 for _ in range(W)] for _ in range(H)]

    for a in range(H):
        left = 0
        for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
    for b in range(W):
        top = 0
        for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

    for i in reversed(range(H)):
        right = 0
        for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

    for j in reversed(range(W)):
        bot = 0
        for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
    ans = 0
    for i in range(H):
        for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
    return ans - 1


print(m()) def m():
    H, W = map(int, input().split())
    S = [list(input()) for _ in range(H)]
    Gx = [[-1 for _ in range(W)] for _ in range(H)]
    Gy = [[-1 for _ in range(W)] for _ in range(H)]

    for a in range(H):
        left = 0
        for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
    for b in range(W):
        top = 0
        for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

    for i in reversed(range(H)):
        right = 0
        for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

    for j in reversed(range(W)):
        bot = 0
        for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
    ans = 0
    for i in range(H):
        for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
    return ans - 1 m H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W list(input()) for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) list(input()) list input() input S = [list(input()) for _ in range(H)] S [list(input()) for _ in range(H)] [-1 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [-1 for _ in range(W)] Gx = [[-1 for _ in range(W)] for _ in range(H)] Gx [[-1 for _ in range(W)] for _ in range(H)] [-1 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [-1 for _ in range(W)] Gy = [[-1 for _ in range(W)] for _ in range(H)] Gy [[-1 for _ in range(W)] for _ in range(H)] for a in range(H):
        left = 0
        for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
     a range(H) range H left = 0 left 0 for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
     b range(W) range W if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
     S[a][b] == '#' S[a][b] [a] S a b '#' left = 0 left 0 Gx[a][b] = left + 1 Gx[a][b] [a] Gx a b left + 1 left 1 left = Gx[a][b] left Gx[a][b] [a] Gx a b for b in range(W):
        top = 0
        for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

     b range(W) range W top = 0 top 0 for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

     a range(H) range H if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

     S[a][b] == '#' S[a][b] [a] S a b '#' top = 0 top 0 Gy[a][b] = top + 1 Gy[a][b] [a] Gy a b top + 1 top 1 top = Gy[a][b] top Gy[a][b] [a] Gy a b for i in reversed(range(H)):
        right = 0
        for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

     i reversed(range(H)) reversed range(H) range H right = 0 right 0 for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

     j reversed(range(W)) reversed range(W) range W if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

     Gx[i][j] == -1 Gx[i][j] [i] Gx i j -1 right = 0 right 0 Gx[i][j] = max(Gx[i][j], right) Gx[i][j] [i] Gx i j max(Gx[i][j], right) max Gx[i][j] [i] Gx i j right right = Gx[i][j] right Gx[i][j] [i] Gx i j for j in reversed(range(W)):
        bot = 0
        for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
     j reversed(range(W)) reversed range(W) range W bot = 0 bot 0 for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
     i reversed(range(H)) reversed range(H) range H if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
     Gy[i][j] == -1 Gy[i][j] [i] Gy i j -1 bot = 0 bot 0 Gy[i][j] = max(Gy[i][j], bot) Gy[i][j] [i] Gy i j max(Gy[i][j], bot) max Gy[i][j] [i] Gy i j bot bot = Gy[i][j] bot Gy[i][j] [i] Gy i j ans = 0 ans 0 for i in range(H):
        for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
     i range(H) range H for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
     j range(W) range W ans = max(Gx[i][j] + Gy[i][j], ans) ans max(Gx[i][j] + Gy[i][j], ans) max Gx[i][j] + Gy[i][j] Gx[i][j] [i] Gx i j Gy[i][j] [i] Gy i j ans return ans - 1 ans - 1 ans 1 print(m()) print m() m def m():
    H, W = map(int, input().split())
    S = [list(input()) for _ in range(H)]
    Gx = [[-1 for _ in range(W)] for _ in range(H)]
    Gy = [[-1 for _ in range(W)] for _ in range(H)]

    for a in range(H):
        left = 0
        for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
    for b in range(W):
        top = 0
        for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

    for i in reversed(range(H)):
        right = 0
        for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

    for j in reversed(range(W)):
        bot = 0
        for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
    ans = 0
    for i in range(H):
        for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
    return ans - 1 def m():
    H, W = map(int, input().split())
    S = [list(input()) for _ in range(H)]
    Gx = [[-1 for _ in range(W)] for _ in range(H)]
    Gy = [[-1 for _ in range(W)] for _ in range(H)]

    for a in range(H):
        left = 0
        for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
    for b in range(W):
        top = 0
        for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

    for i in reversed(range(H)):
        right = 0
        for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

    for j in reversed(range(W)):
        bot = 0
        for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
    ans = 0
    for i in range(H):
        for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
    return ans - 1 m
def m():
    H, W = map(int, input().split())
    S = [list(input()) for _ in range(H)]
    Gx = [[-1 for _ in range(W)] for _ in range(H)]
    Gy = [[-1 for _ in range(W)] for _ in range(H)]

    for a in range(H):
        left = 0
        for b in range(W):
            if S[a][b] == '#':
                left = 0
            else:
                Gx[a][b] = left + 1
                left = Gx[a][b]
    for b in range(W):
        top = 0
        for a in range(H):
            if S[a][b] == '#':
                top = 0
            else:
                Gy[a][b] = top + 1
                top = Gy[a][b]

    for i in reversed(range(H)):
        right = 0
        for j in reversed(range(W)):
            if Gx[i][j] == -1:
                right = 0
            else:
                Gx[i][j] = max(Gx[i][j], right)
                right = Gx[i][j]

    for j in reversed(range(W)):
        bot = 0
        for i in reversed(range(H)):
            if Gy[i][j] == -1:
                bot = 0
            else:
                Gy[i][j] = max(Gy[i][j], bot)
                bot = Gy[i][j]
    ans = 0
    for i in range(H):
        for j in range(W):
            ans = max(Gx[i][j] + Gy[i][j], ans)
    return ans - 1


print(m())
