import sys
readline = sys.stdin.readline

H,W = map(int,readline().split())
grid = [readline().rstrip() for i in range(H)]

# 各マスについて、上下左右にそれぞれ照射できるマスがいくつあるか
L = [[0] * W for i in range(H)]
R = [[0] * W for i in range(H)]
U = [[0] * W for i in range(H)]
D = [[0] * W for i in range(H)]

for i in range(H):
  cur = 0
  for j in range(W):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    L[i][j] = cur
  cur = 0
  for j in range(W - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    R[i][j] = cur
    
for j in range(W):
  cur = 0
  for i in range(H):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    U[i][j] = cur
  cur = 0
  for i in range(H - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    D[i][j] = cur
    
ans = 0
for i in range(H):
  for j in range(W):
    if ans < L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3:
      ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
      
print(ans) import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline H,W = map(int,readline().split()) H map(int,readline().split()) map int readline().split() ().split () readline split W readline().rstrip() for i in range(H) for i in range(H) i range(H) range H for i in range(H) readline().rstrip() ().rstrip () readline rstrip grid = [readline().rstrip() for i in range(H)] grid [readline().rstrip() for i in range(H)] [0] * W for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0] * W [0] 0 W L = [[0] * W for i in range(H)] L [[0] * W for i in range(H)] [0] * W for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0] * W [0] 0 W R = [[0] * W for i in range(H)] R [[0] * W for i in range(H)] [0] * W for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0] * W [0] 0 W U = [[0] * W for i in range(H)] U [[0] * W for i in range(H)] [0] * W for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0] * W [0] 0 W D = [[0] * W for i in range(H)] D [[0] * W for i in range(H)] for i in range(H):
  cur = 0
  for j in range(W):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    L[i][j] = cur
  cur = 0
  for j in range(W - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    R[i][j] = cur
     i range(H) range H cur = 0 cur 0 for j in range(W):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    L[i][j] = cur
   j range(W) range W if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
     grid[i][j] == "#" grid[i][j] [i] grid i j "#" cur = 0 cur 0 cur += 1 cur 1 L[i][j] = cur L[i][j] [i] L i j cur cur = 0 cur 0 for j in range(W - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    R[i][j] = cur
     j range(W - 1,-1,-1) range W - 1 W 1 -1 -1 if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
     grid[i][j] == "#" grid[i][j] [i] grid i j "#" cur = 0 cur 0 cur += 1 cur 1 R[i][j] = cur R[i][j] [i] R i j cur for j in range(W):
  cur = 0
  for i in range(H):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    U[i][j] = cur
  cur = 0
  for i in range(H - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    D[i][j] = cur
     j range(W) range W cur = 0 cur 0 for i in range(H):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    U[i][j] = cur
   i range(H) range H if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
     grid[i][j] == "#" grid[i][j] [i] grid i j "#" cur = 0 cur 0 cur += 1 cur 1 U[i][j] = cur U[i][j] [i] U i j cur cur = 0 cur 0 for i in range(H - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    D[i][j] = cur
     i range(H - 1,-1,-1) range H - 1 H 1 -1 -1 if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
     grid[i][j] == "#" grid[i][j] [i] grid i j "#" cur = 0 cur 0 cur += 1 cur 1 D[i][j] = cur D[i][j] [i] D i j cur ans = 0 ans 0 for i in range(H):
  for j in range(W):
    if ans < L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3:
      ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
       i range(H) range H for j in range(W):
    if ans < L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3:
      ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
       j range(W) range W if ans < L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3:
      ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
       ans < L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 ans L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 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 3 ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 ans L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 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 3 print(ans) print ans cur += 1 1 cur cur = 0 0 cur W = map(int,readline().split()) map(int,readline().split()) W cur = 0 0 cur L = [[0] * W for i in range(H)] [[0] * W for i in range(H)] L cur = 0 0 cur cur += 1 1 cur U = [[0] * W for i in range(H)] [[0] * W for i in range(H)] U cur = 0 0 cur grid = [readline().rstrip() for i in range(H)] [readline().rstrip() for i in range(H)] grid R = [[0] * W for i in range(H)] [[0] * W for i in range(H)] R cur = 0 0 cur readline = sys.stdin.readline sys.stdin.readline readline cur = 0 0 cur D = [[0] * W for i in range(H)] [[0] * W for i in range(H)] D H,W = map(int,readline().split()) map(int,readline().split()) H cur = 0 0 cur cur += 1 1 cur ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 ans ans = 0 0 ans cur += 1 1 cur cur = 0 0 cur
import sys
readline = sys.stdin.readline

H,W = map(int,readline().split())
grid = [readline().rstrip() for i in range(H)]

# 各マスについて、上下左右にそれぞれ照射できるマスがいくつあるか
L = [[0] * W for i in range(H)]
R = [[0] * W for i in range(H)]
U = [[0] * W for i in range(H)]
D = [[0] * W for i in range(H)]

for i in range(H):
  cur = 0
  for j in range(W):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    L[i][j] = cur
  cur = 0
  for j in range(W - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    R[i][j] = cur
    
for j in range(W):
  cur = 0
  for i in range(H):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    U[i][j] = cur
  cur = 0
  for i in range(H - 1,-1,-1):
    if grid[i][j] == "#":
      cur = 0
    else:
      cur += 1
    D[i][j] = cur
    
ans = 0
for i in range(H):
  for j in range(W):
    if ans < L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3:
      ans = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
      
print(ans)