#!/usr/bin/env python3
import sys
import collections as cl


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    H, W = MI()
    room = [["" for j in range(W)] for i in range(H)]
    roomT = [["" for i in range(H)] for j in range(W)]
    num_yoko = [[0 for j in range(W)] for i in range(H)]
    for i in range(H):
        row = input()

        splited = list(map(len, row.split('#')))
        tmp = 0
        for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

    ans = 0

    for j in range(W):
        target = roomT[j]
        splited = list(map(len, "".join(target).split('#')))
        tmp = 0
        for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
    print(ans)


main() import sys sys import collections as cl collections def II(): return int(sys.stdin.readline()) II def MI(): return map(int, sys.stdin.readline().split()) MI def LI(): return list(map(int, sys.stdin.readline().split())) LI def main():
    H, W = MI()
    room = [["" for j in range(W)] for i in range(H)]
    roomT = [["" for i in range(H)] for j in range(W)]
    num_yoko = [[0 for j in range(W)] for i in range(H)]
    for i in range(H):
        row = input()

        splited = list(map(len, row.split('#')))
        tmp = 0
        for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

    ans = 0

    for j in range(W):
        target = roomT[j]
        splited = list(map(len, "".join(target).split('#')))
        tmp = 0
        for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
    print(ans) main H, W = MI() H MI() MI W ["" for j in range(W)] for i in range(H) for i in range(H) i range(H) range H for i in range(H) ["" for j in range(W)] room = [["" for j in range(W)] for i in range(H)] room [["" for j in range(W)] for i in range(H)] ["" for i in range(H)] for j in range(W) for j in range(W) j range(W) range W for j in range(W) ["" for i in range(H)] roomT = [["" for i in range(H)] for j in range(W)] roomT [["" for i in range(H)] for j in range(W)] [0 for j in range(W)] for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0 for j in range(W)] num_yoko = [[0 for j in range(W)] for i in range(H)] num_yoko [[0 for j in range(W)] for i in range(H)] for i in range(H):
        row = input()

        splited = list(map(len, row.split('#')))
        tmp = 0
        for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

     i range(H) range H row = input() row input() input splited = list(map(len, row.split('#'))) splited list(map(len, row.split('#'))) list map(len, row.split('#')) map len row.split('#') row.split row split '#' tmp = 0 tmp 0 for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

     j range(W) range W roomT[j][i] = row[j] roomT[j][i] [j] roomT j i row[j] row j room[i][j] = row[j] room[i][j] [i] room i j row[j] row j if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

     row[j] == "#" row[j] row j "#" num_yoko[i][j] = 0 num_yoko[i][j] [i] num_yoko i j 0 tmp += 1 tmp 1 num_yoko[i][j] = splited[tmp] num_yoko[i][j] [i] num_yoko i j splited[tmp] splited tmp ans = 0 ans 0 for j in range(W):
        target = roomT[j]
        splited = list(map(len, "".join(target).split('#')))
        tmp = 0
        for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
     j range(W) range W target = roomT[j] target roomT[j] roomT j splited = list(map(len, "".join(target).split('#'))) splited list(map(len, "".join(target).split('#'))) list map(len, "".join(target).split('#')) map len "".join(target).split('#') "".join(target).split "".join(target) "".join "" join target split '#' tmp = 0 tmp 0 for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
     i range(H) range H num_tate = 0 if target[i] == "#" else splited[tmp] num_tate 0 if target[i] == "#" else splited[tmp] target[i] == "#" target[i] target i "#" 0 splited[tmp] splited tmp ans = max(ans,  num_tate + num_yoko[i][j] - 1) ans max(ans,  num_tate + num_yoko[i][j] - 1) max ans num_tate + num_yoko[i][j] - 1 num_tate + num_yoko[i][j] num_tate num_yoko[i][j] [i] num_yoko i j 1 if target[i] == "#":
                tmp += 1
     target[i] == "#" target[i] target i "#" tmp += 1 tmp 1 print(ans) print ans main() main def MI(): return map(int, sys.stdin.readline().split()) def MI(): return map(int, sys.stdin.readline().split()) MI def II(): return int(sys.stdin.readline()) def II(): return int(sys.stdin.readline()) II def LI(): return list(map(int, sys.stdin.readline().split())) def LI(): return list(map(int, sys.stdin.readline().split())) LI def main():
    H, W = MI()
    room = [["" for j in range(W)] for i in range(H)]
    roomT = [["" for i in range(H)] for j in range(W)]
    num_yoko = [[0 for j in range(W)] for i in range(H)]
    for i in range(H):
        row = input()

        splited = list(map(len, row.split('#')))
        tmp = 0
        for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

    ans = 0

    for j in range(W):
        target = roomT[j]
        splited = list(map(len, "".join(target).split('#')))
        tmp = 0
        for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
    print(ans) def main():
    H, W = MI()
    room = [["" for j in range(W)] for i in range(H)]
    roomT = [["" for i in range(H)] for j in range(W)]
    num_yoko = [[0 for j in range(W)] for i in range(H)]
    for i in range(H):
        row = input()

        splited = list(map(len, row.split('#')))
        tmp = 0
        for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

    ans = 0

    for j in range(W):
        target = roomT[j]
        splited = list(map(len, "".join(target).split('#')))
        tmp = 0
        for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
    print(ans) main
#!/usr/bin/env python3
import sys
import collections as cl


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    H, W = MI()
    room = [["" for j in range(W)] for i in range(H)]
    roomT = [["" for i in range(H)] for j in range(W)]
    num_yoko = [[0 for j in range(W)] for i in range(H)]
    for i in range(H):
        row = input()

        splited = list(map(len, row.split('#')))
        tmp = 0
        for j in range(W):
            roomT[j][i] = row[j]
            room[i][j] = row[j]
            if row[j] == "#":
                num_yoko[i][j] = 0
                tmp += 1
            else:
                num_yoko[i][j] = splited[tmp]

    ans = 0

    for j in range(W):
        target = roomT[j]
        splited = list(map(len, "".join(target).split('#')))
        tmp = 0
        for i in range(H):
            num_tate = 0 if target[i] == "#" else splited[tmp]
            ans = max(ans,  num_tate + num_yoko[i][j] - 1)
            if target[i] == "#":
                tmp += 1
    print(ans)


main()
