import sys
import numpy as np
input = sys.stdin.readline
h,w = map(int,input().split())
s = (np.array([list(input().strip()) for _ in range(h)])==".").astype(np.int)
l,r,u,d = s.copy(),s.copy(),s.copy(),s.copy()
for i in range(1,w):
  l[:,i] *= l[:,i-1] + 1
  r[:,w-i-1] *= r[:,w-i] + 1

for i in range(1,h):
  u[i] *= u[i-1] + 1
  d[h-i-1] *= d[h-i] + 1
print(max([max(i) for i in l+r+u+d-3])) import sys sys import numpy as np numpy input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline h,w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w list(input().strip()) for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) list(input().strip()) list input().strip() ().strip () input strip s = (np.array([list(input().strip()) for _ in range(h)])==".").astype(np.int) s (np.array([list(input().strip()) for _ in range(h)])==".").astype(np.int) np.array([list(input().strip()) for _ in range(h)])==".").astype np.array([list(input().strip()) for _ in range(h)])=="." np.array([list(input().strip()) for _ in range(h)]) np.array np array [list(input().strip()) for _ in range(h)] "." astype np.int np int l,r,u,d = s.copy(),s.copy(),s.copy(),s.copy() l s.copy() s.copy s copy r s.copy() s.copy s copy u s.copy() s.copy s copy d s.copy() s.copy s copy for i in range(1,w):
  l[:,i] *= l[:,i-1] + 1
  r[:,w-i-1] *= r[:,w-i] + 1 i range(1,w) range 1 w l[:,i] *= l[:,i-1] + 1 l[:,i] l : l[:,i-1] + 1 l[:,i-1] l : 1 r[:,w-i-1] *= r[:,w-i] + 1 r[:,w-i-1] r : r[:,w-i] + 1 r[:,w-i] r : 1 for i in range(1,h):
  u[i] *= u[i-1] + 1
  d[h-i-1] *= d[h-i] + 1 i range(1,h) range 1 h u[i] *= u[i-1] + 1 u[i] u i u[i-1] + 1 u[i-1] u i-1 i 1 1 d[h-i-1] *= d[h-i] + 1 d[h-i-1] d h-i-1 h-i h i 1 d[h-i] + 1 d[h-i] d h-i h i 1 max(i) for i in l+r+u+d-3 for i in l+r+u+d-3 i l+r+u+d-3 l+r+u+d l+r+u l+r l r u d 3 for i in l+r+u+d-3 max(i) max i print(max([max(i) for i in l+r+u+d-3])) print max([max(i) for i in l+r+u+d-3]) max [max(i) for i in l+r+u+d-3] s = (np.array([list(input().strip()) for _ in range(h)])==".").astype(np.int) (np.array([list(input().strip()) for _ in range(h)])==".").astype(np.int) s input = sys.stdin.readline sys.stdin.readline input h,w = map(int,input().split()) map(int,input().split()) h w = map(int,input().split()) map(int,input().split()) w u,d = s.copy(),s.copy(),s.copy(),s.copy() s.copy() u d = s.copy(),s.copy(),s.copy(),s.copy() s.copy() d l,r,u,d = s.copy(),s.copy(),s.copy(),s.copy() s.copy() l r,u,d = s.copy(),s.copy(),s.copy(),s.copy() s.copy() r
import sys
import numpy as np
input = sys.stdin.readline
h,w = map(int,input().split())
s = (np.array([list(input().strip()) for _ in range(h)])==".").astype(np.int)
l,r,u,d = s.copy(),s.copy(),s.copy(),s.copy()
for i in range(1,w):
  l[:,i] *= l[:,i-1] + 1
  r[:,w-i-1] *= r[:,w-i] + 1

for i in range(1,h):
  u[i] *= u[i-1] + 1
  d[h-i-1] *= d[h-i] + 1
print(max([max(i) for i in l+r+u+d-3]))