H, W = map(int, input().split())
Ss = [input() for _ in range(H)]

# 各マスから左に何マスいったら壁にぶつかるか
left = [[-1 for _ in range(W)] for _ in range(H)]
right = [[-1 for _ in range(W)] for _ in range(H)]
top = [[-1 for _ in range(W)] for _ in range(H)]
bottom = [[-1 for _ in range(W)] for _ in range(H)]


# 左に何マスいったらぶつかるか
for i in range(H):
    count = 0
    for j in range(W):
        if Ss[i][j] == "#":
            count = 0
        else:
            left[i][j] = count
            count += 1

# 右に何マスいったらぶつかるか
for i in range(H):
    count = 0
    for j in range(W):
        k = W-j-1
        if Ss[i][k] == "#":
            count = 0
        else:
            right[i][k] = count
            count += 1

# 上に何マスいったらぶつかるか
for j in range(W):
    count = 0
    for i in range(H):
        if Ss[i][j] == "#":
            count = 0
        else:
            top[i][j] = count
            count += 1

# 下に何マスいったらぶつかるか
for j in range(W):
    count = 0
    for i in range(H):
        k = H - i - 1
        if Ss[k][j] == "#":
            count = 0
        else:
            bottom[k][j] = count
            count += 1

# print("right")
# for i in range(H):
#     print(right[i])
#
# print("left")
# for i in range(H):
#     print(left[i])
#
# print("bottom")
# for i in range(H):
#     print(bottom[i])
#
# print("top")
# for i in range(H):
#     print(top[i])

max_score = 0
for i in range(H):
    for j in range(W):
        if Ss[i][j] != "#":
            score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1
            max_score = max(max_score, score)

print(max_score) H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W input() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) input() input Ss = [input() for _ in range(H)] Ss [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)] left = [[-1 for _ in range(W)] for _ in range(H)] left [[-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)] right = [[-1 for _ in range(W)] for _ in range(H)] right [[-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)] top = [[-1 for _ in range(W)] for _ in range(H)] top [[-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)] bottom = [[-1 for _ in range(W)] for _ in range(H)] bottom [[-1 for _ in range(W)] for _ in range(H)] for i in range(H):
    count = 0
    for j in range(W):
        if Ss[i][j] == "#":
            count = 0
        else:
            left[i][j] = count
            count += 1

# 右に何マスいったらぶつかるか i range(H) range H count = 0 count 0 for j in range(W):
        if Ss[i][j] == "#":
            count = 0
        else:
            left[i][j] = count
            count += 1

# 右に何マスいったらぶつかるか j range(W) range W if Ss[i][j] == "#":
            count = 0
        else:
            left[i][j] = count
            count += 1

# 右に何マスいったらぶつかるか Ss[i][j] == "#" Ss[i][j] [i] Ss i j "#" count = 0 count 0 left[i][j] = count left[i][j] [i] left i j count count += 1 count 1 for i in range(H):
    count = 0
    for j in range(W):
        k = W-j-1
        if Ss[i][k] == "#":
            count = 0
        else:
            right[i][k] = count
            count += 1

# 上に何マスいったらぶつかるか i range(H) range H count = 0 count 0 for j in range(W):
        k = W-j-1
        if Ss[i][k] == "#":
            count = 0
        else:
            right[i][k] = count
            count += 1

# 上に何マスいったらぶつかるか j range(W) range W k = W-j-1 k W-j-1 W-j W j 1 if Ss[i][k] == "#":
            count = 0
        else:
            right[i][k] = count
            count += 1

# 上に何マスいったらぶつかるか Ss[i][k] == "#" Ss[i][k] [i] Ss i k "#" count = 0 count 0 right[i][k] = count right[i][k] [i] right i k count count += 1 count 1 for j in range(W):
    count = 0
    for i in range(H):
        if Ss[i][j] == "#":
            count = 0
        else:
            top[i][j] = count
            count += 1

# 下に何マスいったらぶつかるか j range(W) range W count = 0 count 0 for i in range(H):
        if Ss[i][j] == "#":
            count = 0
        else:
            top[i][j] = count
            count += 1

# 下に何マスいったらぶつかるか i range(H) range H if Ss[i][j] == "#":
            count = 0
        else:
            top[i][j] = count
            count += 1

# 下に何マスいったらぶつかるか Ss[i][j] == "#" Ss[i][j] [i] Ss i j "#" count = 0 count 0 top[i][j] = count top[i][j] [i] top i j count count += 1 count 1 for j in range(W):
    count = 0
    for i in range(H):
        k = H - i - 1
        if Ss[k][j] == "#":
            count = 0
        else:
            bottom[k][j] = count
            count += 1

# print("right")
# for i in range(H):
#     print(right[i])
#
# print("left")
# for i in range(H):
#     print(left[i])
#
# print("bottom")
# for i in range(H):
#     print(bottom[i])
#
# print("top")
# for i in range(H):
#     print(top[i]) j range(W) range W count = 0 count 0 for i in range(H):
        k = H - i - 1
        if Ss[k][j] == "#":
            count = 0
        else:
            bottom[k][j] = count
            count += 1

# print("right")
# for i in range(H):
#     print(right[i])
#
# print("left")
# for i in range(H):
#     print(left[i])
#
# print("bottom")
# for i in range(H):
#     print(bottom[i])
#
# print("top")
# for i in range(H):
#     print(top[i]) i range(H) range H k = H - i - 1 k H - i - 1 H - i H i 1 if Ss[k][j] == "#":
            count = 0
        else:
            bottom[k][j] = count
            count += 1

# print("right")
# for i in range(H):
#     print(right[i])
#
# print("left")
# for i in range(H):
#     print(left[i])
#
# print("bottom")
# for i in range(H):
#     print(bottom[i])
#
# print("top")
# for i in range(H):
#     print(top[i]) Ss[k][j] == "#" Ss[k][j] [k] Ss k j "#" count = 0 count 0 bottom[k][j] = count bottom[k][j] [k] bottom k j count count += 1 count 1 max_score = 0 max_score 0 for i in range(H):
    for j in range(W):
        if Ss[i][j] != "#":
            score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1
            max_score = max(max_score, score) i range(H) range H for j in range(W):
        if Ss[i][j] != "#":
            score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1
            max_score = max(max_score, score) j range(W) range W if Ss[i][j] != "#":
            score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1
            max_score = max(max_score, score) Ss[i][j] != "#" Ss[i][j] [i] Ss i j "#" score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1 score left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1 left[i][j] + right[i][j] + top[i][j] + bottom[i][j] left[i][j] + right[i][j] + top[i][j] left[i][j] + right[i][j] left[i][j] [i] left i j right[i][j] [i] right i j top[i][j] [i] top i j bottom[i][j] [i] bottom i j 1 max_score = max(max_score, score) max_score max(max_score, score) max max_score score print(max_score) print max_score k = W-j-1 W-j-1 k count += 1 1 count count = 0 0 count count = 0 0 count count = 0 0 count count = 0 0 count max_score = max(max_score, score) max(max_score, score) max_score H, W = map(int, input().split()) map(int, input().split()) H count += 1 1 count count += 1 1 count count = 0 0 count count = 0 0 count left = [[-1 for _ in range(W)] for _ in range(H)] [[-1 for _ in range(W)] for _ in range(H)] left W = map(int, input().split()) map(int, input().split()) W right = [[-1 for _ in range(W)] for _ in range(H)] [[-1 for _ in range(W)] for _ in range(H)] right count = 0 0 count bottom = [[-1 for _ in range(W)] for _ in range(H)] [[-1 for _ in range(W)] for _ in range(H)] bottom score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1 left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1 score count += 1 1 count max_score = 0 0 max_score Ss = [input() for _ in range(H)] [input() for _ in range(H)] Ss count = 0 0 count k = H - i - 1 H - i - 1 k top = [[-1 for _ in range(W)] for _ in range(H)] [[-1 for _ in range(W)] for _ in range(H)] top
H, W = map(int, input().split())
Ss = [input() for _ in range(H)]

# 各マスから左に何マスいったら壁にぶつかるか
left = [[-1 for _ in range(W)] for _ in range(H)]
right = [[-1 for _ in range(W)] for _ in range(H)]
top = [[-1 for _ in range(W)] for _ in range(H)]
bottom = [[-1 for _ in range(W)] for _ in range(H)]


# 左に何マスいったらぶつかるか
for i in range(H):
    count = 0
    for j in range(W):
        if Ss[i][j] == "#":
            count = 0
        else:
            left[i][j] = count
            count += 1

# 右に何マスいったらぶつかるか
for i in range(H):
    count = 0
    for j in range(W):
        k = W-j-1
        if Ss[i][k] == "#":
            count = 0
        else:
            right[i][k] = count
            count += 1

# 上に何マスいったらぶつかるか
for j in range(W):
    count = 0
    for i in range(H):
        if Ss[i][j] == "#":
            count = 0
        else:
            top[i][j] = count
            count += 1

# 下に何マスいったらぶつかるか
for j in range(W):
    count = 0
    for i in range(H):
        k = H - i - 1
        if Ss[k][j] == "#":
            count = 0
        else:
            bottom[k][j] = count
            count += 1

# print("right")
# for i in range(H):
#     print(right[i])
#
# print("left")
# for i in range(H):
#     print(left[i])
#
# print("bottom")
# for i in range(H):
#     print(bottom[i])
#
# print("top")
# for i in range(H):
#     print(top[i])

max_score = 0
for i in range(H):
    for j in range(W):
        if Ss[i][j] != "#":
            score = left[i][j] + right[i][j] + top[i][j] + bottom[i][j] + 1
            max_score = max(max_score, score)

print(max_score)
