h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]

for i in range(h):
    count = 0
    start = 0
    end = 0
    for j in range(w):
        if s[i][j] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[i][z] = count
            start = end+1
            count = 0
        end += 1
    for z in range(start, end):
        s[i][z] = count
    # print(s[i])
ans = 0

for i in range(w):
    count = 0
    start = 0
    end = 0
    for j in range(h):
        if s[j][i] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[z][i] += count
            start = end+1
            count = 0
        end += 1
    for z in range(start, end):
        s[z][i] += count
# print()
for i in range(h):
    # print(s[i])
    for j in range(w):

        if s[i][j] != "#":
            ans = max(ans, s[i][j])
print(ans-1) 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)] for i in range(h):
    count = 0
    start = 0
    end = 0
    for j in range(w):
        if s[i][j] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[i][z] = count
            start = end+1
            count = 0
        end += 1
    for z in range(start, end):
        s[i][z] = count
    # print(s[i]) i range(h) range h count = 0 count 0 start = 0 start 0 end = 0 end 0 for j in range(w):
        if s[i][j] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[i][z] = count
            start = end+1
            count = 0
        end += 1
     j range(w) range w if s[i][j] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[i][z] = count
            start = end+1
            count = 0
         s[i][j] != "#" s[i][j] [i] s i j "#" count += 1 count 1 for z in range(start, end):
                s[i][z] = count
             z range(start, end) range start end s[i][z] = count s[i][z] [i] s i z count start = end+1 start end+1 end 1 count = 0 count 0 end += 1 end 1 for z in range(start, end):
        s[i][z] = count
    # print(s[i]) z range(start, end) range start end s[i][z] = count s[i][z] [i] s i z count ans = 0 ans 0 for i in range(w):
    count = 0
    start = 0
    end = 0
    for j in range(h):
        if s[j][i] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[z][i] += count
            start = end+1
            count = 0
        end += 1
    for z in range(start, end):
        s[z][i] += count
# print() i range(w) range w count = 0 count 0 start = 0 start 0 end = 0 end 0 for j in range(h):
        if s[j][i] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[z][i] += count
            start = end+1
            count = 0
        end += 1
     j range(h) range h if s[j][i] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[z][i] += count
            start = end+1
            count = 0
         s[j][i] != "#" s[j][i] [j] s j i "#" count += 1 count 1 for z in range(start, end):
                s[z][i] += count
             z range(start, end) range start end s[z][i] += count s[z][i] [z] s z i count start = end+1 start end+1 end 1 count = 0 count 0 end += 1 end 1 for z in range(start, end):
        s[z][i] += count
# print() z range(start, end) range start end s[z][i] += count s[z][i] [z] s z i count for i in range(h):
    # print(s[i])
    for j in range(w):

        if s[i][j] != "#":
            ans = max(ans, s[i][j]) i range(h) range h for j in range(w):

        if s[i][j] != "#":
            ans = max(ans, s[i][j]) j range(w) range w if s[i][j] != "#":
            ans = max(ans, s[i][j]) s[i][j] != "#" s[i][j] [i] s i j "#" ans = max(ans, s[i][j]) ans max(ans, s[i][j]) max ans s[i][j] [i] s i j print(ans-1) print ans-1 ans 1 w = map(int, input().split()) map(int, input().split()) w ans = max(ans, s[i][j]) max(ans, s[i][j]) ans count = 0 0 count end += 1 1 end count = 0 0 count ans = 0 0 ans count = 0 0 count start = end+1 end+1 start start = end+1 end+1 start count += 1 1 count start = 0 0 start count = 0 0 count h, w = map(int, input().split()) map(int, input().split()) h s = [list(input()) for _ in range(h)] [list(input()) for _ in range(h)] s count += 1 1 count end += 1 1 end end = 0 0 end end = 0 0 end start = 0 0 start
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]

for i in range(h):
    count = 0
    start = 0
    end = 0
    for j in range(w):
        if s[i][j] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[i][z] = count
            start = end+1
            count = 0
        end += 1
    for z in range(start, end):
        s[i][z] = count
    # print(s[i])
ans = 0

for i in range(w):
    count = 0
    start = 0
    end = 0
    for j in range(h):
        if s[j][i] != "#":  # 　#じゃなければおけ
            count += 1
        else:
            for z in range(start, end):
                s[z][i] += count
            start = end+1
            count = 0
        end += 1
    for z in range(start, end):
        s[z][i] += count
# print()
for i in range(h):
    # print(s[i])
    for j in range(w):

        if s[i][j] != "#":
            ans = max(ans, s[i][j])
print(ans-1)
