H, W = [int(i) for i in input().split()]
M = []
for i in range(H):
  S = input()
  M.append(S)

X = []
for i in range(H):
  C = [0 for _ in range(W)]
  count = 0
  for j in range(W-1, -1, -1):
    if M[i][j] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

  r = [0 for _ in range(W)]
  current = C[0]
  for j in range(W):
    if M[i][j] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < W:
        current = C[j+1]
  X.append(r)
Y = []
for i in range(W):
  C = [0 for _ in range(H)]
  count = 0
  for j in range(H-1, -1, -1):
    if M[j][i] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

  r = [0 for _ in range(H)]
  current = C[0]
  for j in range(H):
    if M[j][i] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < H:
        current = C[j+1]
  Y.append(r)

ans = 0
for i in range(H):
  for j in range(W):
    ans = max(ans, X[i][j]+Y[j][i]-1)
print(ans) int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i H, W = [int(i) for i in input().split()] H [int(i) for i in input().split()] W M = [] M [] for i in range(H):
  S = input()
  M.append(S) i range(H) range H S = input() S input() input M.append(S) M.append M append S X = [] X [] for i in range(H):
  C = [0 for _ in range(W)]
  count = 0
  for j in range(W-1, -1, -1):
    if M[i][j] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

  r = [0 for _ in range(W)]
  current = C[0]
  for j in range(W):
    if M[i][j] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < W:
        current = C[j+1]
  X.append(r) i range(H) range H 0 for _ in range(W) for _ in range(W) _ range(W) range W for _ in range(W) 0 C = [0 for _ in range(W)] C [0 for _ in range(W)] count = 0 count 0 for j in range(W-1, -1, -1):
    if M[i][j] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

   j range(W-1, -1, -1) range W-1 W 1 -1 -1 if M[i][j] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

   M[i][j] == "." M[i][j] [i] M i j "." count += 1 count 1 C[j] = count C[j] C j count count = 0 count 0 0 for _ in range(W) for _ in range(W) _ range(W) range W for _ in range(W) 0 r = [0 for _ in range(W)] r [0 for _ in range(W)] current = C[0] current C[0] C 0 for j in range(W):
    if M[i][j] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < W:
        current = C[j+1]
   j range(W) range W if M[i][j] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < W:
        current = C[j+1]
   M[i][j] == "." M[i][j] [i] M i j "." r[j] = current r[j] r j current r[j] = 0 r[j] r j 0 if j + 1 < W:
        current = C[j+1]
   j + 1 < W j + 1 j 1 W current = C[j+1] current C[j+1] C j+1 j 1 X.append(r) X.append X append r Y = [] Y [] for i in range(W):
  C = [0 for _ in range(H)]
  count = 0
  for j in range(H-1, -1, -1):
    if M[j][i] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

  r = [0 for _ in range(H)]
  current = C[0]
  for j in range(H):
    if M[j][i] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < H:
        current = C[j+1]
  Y.append(r) i range(W) range W 0 for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) 0 C = [0 for _ in range(H)] C [0 for _ in range(H)] count = 0 count 0 for j in range(H-1, -1, -1):
    if M[j][i] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

   j range(H-1, -1, -1) range H-1 H 1 -1 -1 if M[j][i] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

   M[j][i] == "." M[j][i] [j] M j i "." count += 1 count 1 C[j] = count C[j] C j count count = 0 count 0 0 for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) 0 r = [0 for _ in range(H)] r [0 for _ in range(H)] current = C[0] current C[0] C 0 for j in range(H):
    if M[j][i] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < H:
        current = C[j+1]
   j range(H) range H if M[j][i] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < H:
        current = C[j+1]
   M[j][i] == "." M[j][i] [j] M j i "." r[j] = current r[j] r j current r[j] = 0 r[j] r j 0 if j + 1 < H:
        current = C[j+1]
   j + 1 < H j + 1 j 1 H current = C[j+1] current C[j+1] C j+1 j 1 Y.append(r) Y.append Y append r ans = 0 ans 0 for i in range(H):
  for j in range(W):
    ans = max(ans, X[i][j]+Y[j][i]-1) i range(H) range H for j in range(W):
    ans = max(ans, X[i][j]+Y[j][i]-1) j range(W) range W ans = max(ans, X[i][j]+Y[j][i]-1) ans max(ans, X[i][j]+Y[j][i]-1) max ans X[i][j]+Y[j][i]-1 X[i][j]+Y[j][i] X[i][j] [i] X i j Y[j][i] [j] Y j i 1 print(ans) print ans X = [] [] X C = [0 for _ in range(W)] [0 for _ in range(W)] C count = 0 0 count current = C[0] C[0] current r = [0 for _ in range(W)] [0 for _ in range(W)] r count += 1 1 count count = 0 0 count ans = max(ans, X[i][j]+Y[j][i]-1) max(ans, X[i][j]+Y[j][i]-1) ans current = C[j+1] C[j+1] current S = input() input() S count = 0 0 count H, W = [int(i) for i in input().split()] [int(i) for i in input().split()] H C = [0 for _ in range(H)] [0 for _ in range(H)] C current = C[j+1] C[j+1] current W = [int(i) for i in input().split()] [int(i) for i in input().split()] W M = [] [] M current = C[0] C[0] current ans = 0 0 ans Y = [] [] Y count += 1 1 count r = [0 for _ in range(H)] [0 for _ in range(H)] r count = 0 0 count
H, W = [int(i) for i in input().split()]
M = []
for i in range(H):
  S = input()
  M.append(S)

X = []
for i in range(H):
  C = [0 for _ in range(W)]
  count = 0
  for j in range(W-1, -1, -1):
    if M[i][j] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

  r = [0 for _ in range(W)]
  current = C[0]
  for j in range(W):
    if M[i][j] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < W:
        current = C[j+1]
  X.append(r)
Y = []
for i in range(W):
  C = [0 for _ in range(H)]
  count = 0
  for j in range(H-1, -1, -1):
    if M[j][i] == ".":
      count += 1
      C[j] = count
    else:
      count = 0

  r = [0 for _ in range(H)]
  current = C[0]
  for j in range(H):
    if M[j][i] == ".":
      r[j] = current
    else:
      r[j] = 0
      if j + 1 < H:
        current = C[j+1]
  Y.append(r)

ans = 0
for i in range(H):
  for j in range(W):
    ans = max(ans, X[i][j]+Y[j][i]-1)
print(ans)
