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

r = [[0] * w for _ in range(h)]
for i in range(h):
  for j in range(w):
    if map[i][j] == ".":
      if j == 0:
        r[i][j] = 1
      else:
        r[i][j] = r[i][j-1] + 1

l = [[0] * w for _ in range(h)]
for i in range(h):
  for j in range(w-1, -1, -1):
    if map[i][j] == ".":
      if j == w - 1:
        l[i][j] = 1
      else:
        l[i][j] = l[i][j+1] + 1
        
d = [[0] * w for _ in range(h)]
for i in range(w):
  for j in range(h):
    if map[j][i] == ".":
      if j == 0:
        d[j][i] = 1
      else:
        d[j][i] = d[j-1][i] + 1

u = [[0] * w for _ in range(h)]
for i in range(w):
  for j in range(h-1, -1, -1):
    if map[j][i] == ".":
      if j == h-1:
        u[j][i] = 1
      else:
        u[j][i] = u[j+1][i] + 1
ans = 0
for i in range(h):
  for j in range(w):
    num = l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3
    if num > ans:
      ans = num
print(ans) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w map = [] map [] for _ in range(h):
  map.append(list(input())) _ range(h) range h map.append(list(input())) map.append map append list(input()) list input() input [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w r = [[0] * w for _ in range(h)] r [[0] * w for _ in range(h)] for i in range(h):
  for j in range(w):
    if map[i][j] == ".":
      if j == 0:
        r[i][j] = 1
      else:
        r[i][j] = r[i][j-1] + 1 i range(h) range h for j in range(w):
    if map[i][j] == ".":
      if j == 0:
        r[i][j] = 1
      else:
        r[i][j] = r[i][j-1] + 1 j range(w) range w if map[i][j] == ".":
      if j == 0:
        r[i][j] = 1
      else:
        r[i][j] = r[i][j-1] + 1 map[i][j] == "." map[i][j] [i] map i j "." if j == 0:
        r[i][j] = 1
      else:
        r[i][j] = r[i][j-1] + 1 j == 0 j 0 r[i][j] = 1 r[i][j] [i] r i j 1 r[i][j] = r[i][j-1] + 1 r[i][j] [i] r i j r[i][j-1] + 1 r[i][j-1] [i] r i j-1 j 1 1 [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w l = [[0] * w for _ in range(h)] l [[0] * w for _ in range(h)] for i in range(h):
  for j in range(w-1, -1, -1):
    if map[i][j] == ".":
      if j == w - 1:
        l[i][j] = 1
      else:
        l[i][j] = l[i][j+1] + 1
         i range(h) range h for j in range(w-1, -1, -1):
    if map[i][j] == ".":
      if j == w - 1:
        l[i][j] = 1
      else:
        l[i][j] = l[i][j+1] + 1
         j range(w-1, -1, -1) range w-1 w 1 -1 -1 if map[i][j] == ".":
      if j == w - 1:
        l[i][j] = 1
      else:
        l[i][j] = l[i][j+1] + 1
         map[i][j] == "." map[i][j] [i] map i j "." if j == w - 1:
        l[i][j] = 1
      else:
        l[i][j] = l[i][j+1] + 1
         j == w - 1 j w - 1 w 1 l[i][j] = 1 l[i][j] [i] l i j 1 l[i][j] = l[i][j+1] + 1 l[i][j] [i] l i j l[i][j+1] + 1 l[i][j+1] [i] l i j+1 j 1 1 [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w d = [[0] * w for _ in range(h)] d [[0] * w for _ in range(h)] for i in range(w):
  for j in range(h):
    if map[j][i] == ".":
      if j == 0:
        d[j][i] = 1
      else:
        d[j][i] = d[j-1][i] + 1 i range(w) range w for j in range(h):
    if map[j][i] == ".":
      if j == 0:
        d[j][i] = 1
      else:
        d[j][i] = d[j-1][i] + 1 j range(h) range h if map[j][i] == ".":
      if j == 0:
        d[j][i] = 1
      else:
        d[j][i] = d[j-1][i] + 1 map[j][i] == "." map[j][i] [j] map j i "." if j == 0:
        d[j][i] = 1
      else:
        d[j][i] = d[j-1][i] + 1 j == 0 j 0 d[j][i] = 1 d[j][i] [j] d j i 1 d[j][i] = d[j-1][i] + 1 d[j][i] [j] d j i d[j-1][i] + 1 d[j-1][i] [j-1] d j-1 j 1 i 1 [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w u = [[0] * w for _ in range(h)] u [[0] * w for _ in range(h)] for i in range(w):
  for j in range(h-1, -1, -1):
    if map[j][i] == ".":
      if j == h-1:
        u[j][i] = 1
      else:
        u[j][i] = u[j+1][i] + 1 i range(w) range w for j in range(h-1, -1, -1):
    if map[j][i] == ".":
      if j == h-1:
        u[j][i] = 1
      else:
        u[j][i] = u[j+1][i] + 1 j range(h-1, -1, -1) range h-1 h 1 -1 -1 if map[j][i] == ".":
      if j == h-1:
        u[j][i] = 1
      else:
        u[j][i] = u[j+1][i] + 1 map[j][i] == "." map[j][i] [j] map j i "." if j == h-1:
        u[j][i] = 1
      else:
        u[j][i] = u[j+1][i] + 1 j == h-1 j h-1 h 1 u[j][i] = 1 u[j][i] [j] u j i 1 u[j][i] = u[j+1][i] + 1 u[j][i] [j] u j i u[j+1][i] + 1 u[j+1][i] [j+1] u j+1 j 1 i 1 ans = 0 ans 0 for i in range(h):
  for j in range(w):
    num = l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3
    if num > ans:
      ans = num i range(h) range h for j in range(w):
    num = l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3
    if num > ans:
      ans = num j range(w) range w num = l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3 num l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3 l[i][j] + r[i][j] + d[i][j] + u[i][j] l[i][j] + r[i][j] + d[i][j] l[i][j] + r[i][j] l[i][j] [i] l i j r[i][j] [i] r i j d[i][j] [i] d i j u[i][j] [i] u i j 3 if num > ans:
      ans = num num > ans num ans ans = num ans num print(ans) print ans d = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] d num = l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3 l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3 num map = [] [] map w = map(int, input().split()) map(int, input().split()) w u = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] u ans = 0 0 ans r = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] r h, w = map(int, input().split()) map(int, input().split()) h l = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] l ans = num num ans
h, w = map(int, input().split()) 
map = []
for _ in range(h):
  map.append(list(input()))

r = [[0] * w for _ in range(h)]
for i in range(h):
  for j in range(w):
    if map[i][j] == ".":
      if j == 0:
        r[i][j] = 1
      else:
        r[i][j] = r[i][j-1] + 1

l = [[0] * w for _ in range(h)]
for i in range(h):
  for j in range(w-1, -1, -1):
    if map[i][j] == ".":
      if j == w - 1:
        l[i][j] = 1
      else:
        l[i][j] = l[i][j+1] + 1
        
d = [[0] * w for _ in range(h)]
for i in range(w):
  for j in range(h):
    if map[j][i] == ".":
      if j == 0:
        d[j][i] = 1
      else:
        d[j][i] = d[j-1][i] + 1

u = [[0] * w for _ in range(h)]
for i in range(w):
  for j in range(h-1, -1, -1):
    if map[j][i] == ".":
      if j == h-1:
        u[j][i] = 1
      else:
        u[j][i] = u[j+1][i] + 1
ans = 0
for i in range(h):
  for j in range(w):
    num = l[i][j] + r[i][j] + d[i][j] + u[i][j] - 3
    if num > ans:
      ans = num
print(ans)
