MOD = 10**9+7
h, w = map(int, input().split())
S = [input() for _ in range(h)]
L = [[0]*w for _ in range(h)]
R = [[0]*w for _ in range(h)]
U = [[0]*w for _ in range(h)]
D = [[0]*w for _ in range(h)]
for i in range(h):
  for j in range(w):
    if j > 0:
      if S[i][j-1] == ".":
        L[i][j] = L[i][j-1]+1
      if S[i][w-j] == ".":
        R[i][w-1-j] = R[i][w-j]+1
    if i > 0:
      if S[i-1][j] == ".":
        U[i][j] = U[i-1][j]+1
      if S[h-i][j] == ".":
        D[h-1-i][j] = D[h-i][j]+1
ans = 0
for i in range(h):
  for j in range(w):
    if S[i][j] == ".":
      temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
      ans = max(ans, temp)
print(ans) MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 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 S = [input() for _ in range(h)] S [input() for _ in range(h)] [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)] [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)] [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)] [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(h):
  for j in range(w):
    if j > 0:
      if S[i][j-1] == ".":
        L[i][j] = L[i][j-1]+1
      if S[i][w-j] == ".":
        R[i][w-1-j] = R[i][w-j]+1
    if i > 0:
      if S[i-1][j] == ".":
        U[i][j] = U[i-1][j]+1
      if S[h-i][j] == ".":
        D[h-1-i][j] = D[h-i][j]+1 i range(h) range h for j in range(w):
    if j > 0:
      if S[i][j-1] == ".":
        L[i][j] = L[i][j-1]+1
      if S[i][w-j] == ".":
        R[i][w-1-j] = R[i][w-j]+1
    if i > 0:
      if S[i-1][j] == ".":
        U[i][j] = U[i-1][j]+1
      if S[h-i][j] == ".":
        D[h-1-i][j] = D[h-i][j]+1 j range(w) range w if j > 0:
      if S[i][j-1] == ".":
        L[i][j] = L[i][j-1]+1
      if S[i][w-j] == ".":
        R[i][w-1-j] = R[i][w-j]+1
     j > 0 j 0 if S[i][j-1] == ".":
        L[i][j] = L[i][j-1]+1
       S[i][j-1] == "." S[i][j-1] [i] S i j-1 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 if S[i][w-j] == ".":
        R[i][w-1-j] = R[i][w-j]+1
     S[i][w-j] == "." S[i][w-j] [i] S i w-j w j "." R[i][w-1-j] = R[i][w-j]+1 R[i][w-1-j] [i] R i w-1-j w-1 w 1 j R[i][w-j]+1 R[i][w-j] [i] R i w-j w j 1 if i > 0:
      if S[i-1][j] == ".":
        U[i][j] = U[i-1][j]+1
      if S[h-i][j] == ".":
        D[h-1-i][j] = D[h-i][j]+1 i > 0 i 0 if S[i-1][j] == ".":
        U[i][j] = U[i-1][j]+1
       S[i-1][j] == "." S[i-1][j] [i-1] S i-1 i 1 j "." U[i][j] = U[i-1][j]+1 U[i][j] [i] U i j U[i-1][j]+1 U[i-1][j] [i-1] U i-1 i 1 j 1 if S[h-i][j] == ".":
        D[h-1-i][j] = D[h-i][j]+1 S[h-i][j] == "." S[h-i][j] [h-i] S h-i h i j "." D[h-1-i][j] = D[h-i][j]+1 D[h-1-i][j] [h-1-i] D h-1-i h-1 h 1 i j D[h-i][j]+1 D[h-i][j] [h-i] D h-i h i j 1 ans = 0 ans 0 for i in range(h):
  for j in range(w):
    if S[i][j] == ".":
      temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
      ans = max(ans, temp) i range(h) range h for j in range(w):
    if S[i][j] == ".":
      temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
      ans = max(ans, temp) j range(w) range w if S[i][j] == ".":
      temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
      ans = max(ans, temp) S[i][j] == "." S[i][j] [i] S i j "." temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1 temp L[i][j]+R[i][j]+U[i][j]+D[i][j]+1 L[i][j]+R[i][j]+U[i][j]+D[i][j] L[i][j]+R[i][j]+U[i][j] L[i][j]+R[i][j] L[i][j] [i] L i j R[i][j] [i] R i j U[i][j] [i] U i j D[i][j] [i] D i j 1 ans = max(ans, temp) ans max(ans, temp) max ans temp print(ans) print ans D = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] D ans = max(ans, temp) max(ans, temp) ans temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1 L[i][j]+R[i][j]+U[i][j]+D[i][j]+1 temp U = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] U w = map(int, input().split()) map(int, input().split()) w S = [input() for _ in range(h)] [input() for _ in range(h)] S MOD = 10**9+7 10**9+7 MOD L = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] L 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 ans = 0 0 ans
MOD = 10**9+7
h, w = map(int, input().split())
S = [input() for _ in range(h)]
L = [[0]*w for _ in range(h)]
R = [[0]*w for _ in range(h)]
U = [[0]*w for _ in range(h)]
D = [[0]*w for _ in range(h)]
for i in range(h):
  for j in range(w):
    if j > 0:
      if S[i][j-1] == ".":
        L[i][j] = L[i][j-1]+1
      if S[i][w-j] == ".":
        R[i][w-1-j] = R[i][w-j]+1
    if i > 0:
      if S[i-1][j] == ".":
        U[i][j] = U[i-1][j]+1
      if S[h-i][j] == ".":
        D[h-1-i][j] = D[h-i][j]+1
ans = 0
for i in range(h):
  for j in range(w):
    if S[i][j] == ".":
      temp = L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
      ans = max(ans, temp)
print(ans)