import numpy as np
h, w = map(int, input().split())
arr = np.array([list(input()) for _ in range(h)]) == "."
# print(arr)
l = np.zeros((h, w), dtype=int)
r = np.zeros((h, w), dtype=int)
u = np.zeros((h, w), dtype=int)
d = np.zeros((h, w), dtype=int)

for i in range(h):
    u[i] = (u[i - 1] + 1) * arr[i] #arrがFalseだと0になる
    d[- i - 1] = (d[- i] + 1) * arr[- i - 1]

for j in range(w):
    l[:, j] = (l[:, j-1] + 1) * arr[:, j]
    r[:, - j - 1] = (r[:, - j] + 1) * arr[:, - j - 1]
# print(u)
print(np.max(u + d + l + r) - 3) import numpy as np numpy 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 arr = np.array([list(input()) for _ in range(h)]) == "." arr np.array([list(input()) for _ in range(h)]) == "." np.array([list(input()) for _ in range(h)]) np.array np array [list(input()) for _ in range(h)] "." l = np.zeros((h, w), dtype=int) l np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int r = np.zeros((h, w), dtype=int) r np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int u = np.zeros((h, w), dtype=int) u np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int d = np.zeros((h, w), dtype=int) d np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int for i in range(h):
    u[i] = (u[i - 1] + 1) * arr[i] #arrがFalseだと0になる
    d[- i - 1] = (d[- i] + 1) * arr[- i - 1] i range(h) range h u[i] = (u[i - 1] + 1) * arr[i] u[i] u i (u[i - 1] + 1) * arr[i] u[i - 1] + 1 u[i - 1] u i - 1 i 1 1 arr[i] arr i d[- i - 1] = (d[- i] + 1) * arr[- i - 1] d[- i - 1] d - i - 1 - i i 1 (d[- i] + 1) * arr[- i - 1] d[- i] + 1 d[- i] d - i i 1 arr[- i - 1] arr - i - 1 - i i 1 for j in range(w):
    l[:, j] = (l[:, j-1] + 1) * arr[:, j]
    r[:, - j - 1] = (r[:, - j] + 1) * arr[:, - j - 1]
# print(u) j range(w) range w l[:, j] = (l[:, j-1] + 1) * arr[:, j] l[:, j] l : (l[:, j-1] + 1) * arr[:, j] l[:, j-1] + 1 l[:, j-1] l : 1 arr[:, j] arr : r[:, - j - 1] = (r[:, - j] + 1) * arr[:, - j - 1] r[:, - j - 1] r : (r[:, - j] + 1) * arr[:, - j - 1] r[:, - j] + 1 r[:, - j] r : 1 arr[:, - j - 1] arr : print(np.max(u + d + l + r) - 3) print np.max(u + d + l + r) - 3 np.max(u + d + l + r) np.max np max u + d + l + r u + d + l u + d u d l r 3 d = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) d r = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) r u = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) u l = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) l h, w = map(int, input().split()) map(int, input().split()) h w = map(int, input().split()) map(int, input().split()) w arr = np.array([list(input()) for _ in range(h)]) == "." np.array([list(input()) for _ in range(h)]) == "." arr
import numpy as np
h, w = map(int, input().split())
arr = np.array([list(input()) for _ in range(h)]) == "."
# print(arr)
l = np.zeros((h, w), dtype=int)
r = np.zeros((h, w), dtype=int)
u = np.zeros((h, w), dtype=int)
d = np.zeros((h, w), dtype=int)

for i in range(h):
    u[i] = (u[i - 1] + 1) * arr[i] #arrがFalseだと0になる
    d[- i - 1] = (d[- i] + 1) * arr[- i - 1]

for j in range(w):
    l[:, j] = (l[:, j-1] + 1) * arr[:, j]
    r[:, - j - 1] = (r[:, - j] + 1) * arr[:, - j - 1]
# print(u)
print(np.max(u + d + l + r) - 3)
