h, w = map(int, input().split())
s = []
s.append(["#"] * (w + 2))
for i in range(h):
    s.append(["#"] + list(input()) + ["#"])
s.append(["#"] * (w + 2))

num = [[-1 for i in range(w + 2)] for i in range(h + 2)]
for i in range(1, h + 1):
    l = 0
    m = 0
    while l < w + 2:
        if s[i][l] == "#":
            l += 1
            continue
        else:
            m = l
            while s[i][m] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[i][j] += m - l
                l = m
for i in range(1, w + 1):
    l = 0
    m = 0
    while l < h + 2:
        if s[l][i] == "#":
            l += 1
            continue
        else:
            m = l
            while s[m][i] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[j][i] += m - l
                l = m
print(max([max([num[i][j] for j in range(w + 2)]) for i in range(h + 2)])) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w s = [] s [] s.append(["#"] * (w + 2)) s.append s append ["#"] * (w + 2) ["#"] "#" w + 2 w 2 for i in range(h):
    s.append(["#"] + list(input()) + ["#"]) i range(h) range h s.append(["#"] + list(input()) + ["#"]) s.append s append ["#"] + list(input()) + ["#"] ["#"] + list(input()) ["#"] "#" list(input()) list input() input ["#"] "#" s.append(["#"] * (w + 2)) s.append s append ["#"] * (w + 2) ["#"] "#" w + 2 w 2 [-1 for i in range(w + 2)] for i in range(h + 2) for i in range(h + 2) i range(h + 2) range h + 2 h 2 for i in range(h + 2) [-1 for i in range(w + 2)] num = [[-1 for i in range(w + 2)] for i in range(h + 2)] num [[-1 for i in range(w + 2)] for i in range(h + 2)] for i in range(1, h + 1):
    l = 0
    m = 0
    while l < w + 2:
        if s[i][l] == "#":
            l += 1
            continue
        else:
            m = l
            while s[i][m] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[i][j] += m - l
                l = m i range(1, h + 1) range 1 h + 1 h 1 l = 0 l 0 m = 0 m 0 while l < w + 2:
        if s[i][l] == "#":
            l += 1
            continue
        else:
            m = l
            while s[i][m] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[i][j] += m - l
                l = m l < w + 2 l w + 2 w 2 if s[i][l] == "#":
            l += 1
            continue
        else:
            m = l
            while s[i][m] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[i][j] += m - l
                l = m s[i][l] == "#" s[i][l] [i] s i l "#" l += 1 l 1 continue m = l m l while s[i][m] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[i][j] += m - l
                l = m s[i][m] == "." s[i][m] [i] s i m "." m += 1 m 1 for j in range(l, m):
                    num[i][j] += m - l
                 j range(l, m) range l m num[i][j] += m - l num[i][j] [i] num i j m - l m l l = m l m for i in range(1, w + 1):
    l = 0
    m = 0
    while l < h + 2:
        if s[l][i] == "#":
            l += 1
            continue
        else:
            m = l
            while s[m][i] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[j][i] += m - l
                l = m i range(1, w + 1) range 1 w + 1 w 1 l = 0 l 0 m = 0 m 0 while l < h + 2:
        if s[l][i] == "#":
            l += 1
            continue
        else:
            m = l
            while s[m][i] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[j][i] += m - l
                l = m l < h + 2 l h + 2 h 2 if s[l][i] == "#":
            l += 1
            continue
        else:
            m = l
            while s[m][i] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[j][i] += m - l
                l = m s[l][i] == "#" s[l][i] [l] s l i "#" l += 1 l 1 continue m = l m l while s[m][i] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[j][i] += m - l
                l = m s[m][i] == "." s[m][i] [m] s m i "." m += 1 m 1 for j in range(l, m):
                    num[j][i] += m - l
                 j range(l, m) range l m num[j][i] += m - l num[j][i] [j] num j i m - l m l l = m l m max([num[i][j] for j in range(w + 2)]) for i in range(h + 2) for i in range(h + 2) i range(h + 2) range h + 2 h 2 for i in range(h + 2) max([num[i][j] for j in range(w + 2)]) max [num[i][j] for j in range(w + 2)] print(max([max([num[i][j] for j in range(w + 2)]) for i in range(h + 2)])) print max([max([num[i][j] for j in range(w + 2)]) for i in range(h + 2)]) max [max([num[i][j] for j in range(w + 2)]) for i in range(h + 2)] h, w = map(int, input().split()) map(int, input().split()) h num = [[-1 for i in range(w + 2)] for i in range(h + 2)] [[-1 for i in range(w + 2)] for i in range(h + 2)] num m = 0 0 m l += 1 1 l m = l l m s = [] [] s m += 1 1 m l = 0 0 l m += 1 1 m m = 0 0 m w = map(int, input().split()) map(int, input().split()) w m = l l m l = m m l l = 0 0 l l = m m l l += 1 1 l
h, w = map(int, input().split())
s = []
s.append(["#"] * (w + 2))
for i in range(h):
    s.append(["#"] + list(input()) + ["#"])
s.append(["#"] * (w + 2))

num = [[-1 for i in range(w + 2)] for i in range(h + 2)]
for i in range(1, h + 1):
    l = 0
    m = 0
    while l < w + 2:
        if s[i][l] == "#":
            l += 1
            continue
        else:
            m = l
            while s[i][m] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[i][j] += m - l
                l = m
for i in range(1, w + 1):
    l = 0
    m = 0
    while l < h + 2:
        if s[l][i] == "#":
            l += 1
            continue
        else:
            m = l
            while s[m][i] == ".":
                m += 1
            else:
                for j in range(l, m):
                    num[j][i] += m - l
                l = m
print(max([max([num[i][j] for j in range(w + 2)]) for i in range(h + 2)]))