def solve(string):

    h, w, *s = string.split()

    h, w = list(map(int, [h, w]))

    hg = []

    hi = []

    vg = []

    vi = []



    for _s in s:

        gn = 0

        _hi = [0] * w

        _hg = []

        c = 0

        for i, __s in enumerate(_s):

            if __s == "#":

                _hi[i] = -1

                gn += 1

                _hg.append(c)

                c = 0

                continue

            _hi[i] = gn

            c += 1

        _hg.append(c)

        hg.append(_hg)

        hi.append(_hi)

    for _s in zip(*s):

        gn = 0

        _vi = [0] * h

        _vg = []

        c = 0

        for i, __s in enumerate(_s):

            if __s == "#":

                _vi[i] = -1

                gn += 1

                _vg.append(c)

                c = 0

                continue

            _vi[i] = gn

            c += 1

        _vg.append(c)

        vg.append(_vg)

        vi.append(_vi)

    ans = 0

    for i in range(h):

        ans = max(ans, max([hg[i][hi[i][j]] + vg[j][vi[j][i]] for j in range(w)]))

    return str(ans - 1)





if __name__ == '__main__':

    n, m = list(map(int, input().split()))

    print((solve('{} {}\n'.format(n, m) + '\n'.join([eval(input()) for _ in range(n)]))))

def solve(string):

    h, w, *s = string.split()

    h, w = list(map(int, [h, w]))

    hg = []

    hi = []

    vg = []

    vi = []



    for _s in s:

        gn = 0

        _hi = [0] * w

        _hg = []

        c = 0

        for i, __s in enumerate(_s):

            if __s == "#":

                _hi[i] = -1

                gn += 1

                _hg.append(c)

                c = 0

                continue

            _hi[i] = gn

            c += 1

        _hg.append(c)

        hg.append(_hg)

        hi.append(_hi)

    for _s in zip(*s):

        gn = 0

        _vi = [0] * h

        _vg = []

        c = 0

        for i, __s in enumerate(_s):

            if __s == "#":

                _vi[i] = -1

                gn += 1

                _vg.append(c)

                c = 0

                continue

            _vi[i] = gn

            c += 1

        _vg.append(c)

        vg.append(_vg)

        vi.append(_vi)



    ans = 0

    for i in range(h):

        for j in range(w):

            ans = max(ans, hg[i][hi[i][j]] + vg[j][vi[j][i]])

    return str(ans - 1)





if __name__ == '__main__':

    n, m = list(map(int, input().split()))

    print((solve('{} {}\n'.format(n, m) + '\n'.join([eval(input()) for _ in range(n)]))))

def solve(string):
    h, w, *s = string.split()
    h, w = list(map(int, [h, w]))
    hg = []
    hi = []
    vg = []
    vi = []
    for _s in s:
        gn = 0
        _hi = [0] * w
        _hg = []
        c = 0
        for i, __s in enumerate(_s):
            if __s == "#":
                _hi[i] = -1
                gn += 1
                _hg.append(c)
                c = 0
                continue
            _hi[i] = gn
            c += 1
        _hg.append(c)
        hg.append(_hg)
        hi.append(_hi)
    for _s in zip(*s):
        gn = 0
        _vi = [0] * h
        _vg = []
        c = 0
        for i, __s in enumerate(_s):
            if __s == "#":
                _vi[i] = -1
                gn += 1
                _vg.append(c)
                c = 0
                continue
            _vi[i] = gn
            c += 1
        _vg.append(c)
        vg.append(_vg)
        vi.append(_vi)
    ans = 0
    for i in range(h):
        ans = max(ans, max([hg[i][hi[i][j]] + vg[j][vi[j][i]] for j in range(w)]))
    return str(ans - 1)


if __name__ == "__main__":
    n, m = list(map(int, input().split()))
    print(
        (solve("{} {}\n".format(n, m) + "\n".join([eval(input()) for _ in range(n)])))
    )

def solve(string):
    h, w, *s = string.split()
    h, w = list(map(int, [h, w]))
    hg = []
    hi = []
    vg = []
    vi = []
    for _s in s:
        gn = 0
        _hi = [0] * w
        _hg = []
        c = 0
        for i, __s in enumerate(_s):
            if __s == "#":
                _hi[i] = -1
                gn += 1
                _hg.append(c)
                c = 0
                continue
            _hi[i] = gn
            c += 1
        _hg.append(c)
        hg.append(_hg)
        hi.append(_hi)
    for _s in zip(*s):
        gn = 0
        _vi = [0] * h
        _vg = []
        c = 0
        for i, __s in enumerate(_s):
            if __s == "#":
                _vi[i] = -1
                gn += 1
                _vg.append(c)
                c = 0
                continue
            _vi[i] = gn
            c += 1
        _vg.append(c)
        vg.append(_vg)
        vi.append(_vi)
    ans = 0
    for i in range(h):
        for j in range(w):
            ans = max(ans, hg[i][hi[i][j]] + vg[j][vi[j][i]])
    return str(ans - 1)


if __name__ == "__main__":
    n, m = list(map(int, input().split()))
    print(
        (solve("{} {}\n".format(n, m) + "\n".join([eval(input()) for _ in range(n)])))
    )

-        ans = max(ans, max([hg[i][hi[i][j]] + vg[j][vi[j][i]] for j in range(w)])) +        for j in range(w): +            ans = max(ans, hg[i][hi[i][j]] + vg[j][vi[j][i]])