import sys

input = sys.stdin.readline

H, W = map(int, input().split())

grid = []

count_w = [[0] * W for _ in range(H)]
count_h = [[0] * W for _ in range(H)]

for _ in range(H):
  grid.append([x for x in input()])
  

for h in range(H):
  r = 0
  count = 0
  for l in range(W):
    while r < W and grid[h][r] == '.':
      r += 1
      count += 1
    count_w[h][l] = count
    if r == l:
      r += 1
      count = 0
      
for w in range(W):
  r = 0
  count = 0
  for l in range(H):
    while r < H and grid[r][w] == '.':
      r += 1
      count += 1
    count_h[l][w] = count
    if r == l:
      r += 1
      count = 0

answer = 0

for h in range(H):
  for w in range(W):
    answer = max(answer, count_h[h][w] + count_w[h][w] - 1)

print(answer) import sys sys 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 grid = [] grid [] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W count_w = [[0] * W for _ in range(H)] count_w [[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 count_h = [[0] * W for _ in range(H)] count_h [[0] * W for _ in range(H)] for _ in range(H):
  grid.append([x for x in input()])
   _ range(H) range H x for x in input() for x in input() x input() input for x in input() x grid.append([x for x in input()]) grid.append grid append [x for x in input()] for h in range(H):
  r = 0
  count = 0
  for l in range(W):
    while r < W and grid[h][r] == '.':
      r += 1
      count += 1
    count_w[h][l] = count
    if r == l:
      r += 1
      count = 0
       h range(H) range H r = 0 r 0 count = 0 count 0 for l in range(W):
    while r < W and grid[h][r] == '.':
      r += 1
      count += 1
    count_w[h][l] = count
    if r == l:
      r += 1
      count = 0
       l range(W) range W while r < W and grid[h][r] == '.':
      r += 1
      count += 1
     r < W and grid[h][r] == '.' r < W r W grid[h][r] == '.' grid[h][r] [h] grid h r '.' r += 1 r 1 count += 1 count 1 count_w[h][l] = count count_w[h][l] [h] count_w h l count if r == l:
      r += 1
      count = 0
       r == l r l r += 1 r 1 count = 0 count 0 for w in range(W):
  r = 0
  count = 0
  for l in range(H):
    while r < H and grid[r][w] == '.':
      r += 1
      count += 1
    count_h[l][w] = count
    if r == l:
      r += 1
      count = 0 w range(W) range W r = 0 r 0 count = 0 count 0 for l in range(H):
    while r < H and grid[r][w] == '.':
      r += 1
      count += 1
    count_h[l][w] = count
    if r == l:
      r += 1
      count = 0 l range(H) range H while r < H and grid[r][w] == '.':
      r += 1
      count += 1
     r < H and grid[r][w] == '.' r < H r H grid[r][w] == '.' grid[r][w] [r] grid r w '.' r += 1 r 1 count += 1 count 1 count_h[l][w] = count count_h[l][w] [l] count_h l w count if r == l:
      r += 1
      count = 0 r == l r l r += 1 r 1 count = 0 count 0 answer = 0 answer 0 for h in range(H):
  for w in range(W):
    answer = max(answer, count_h[h][w] + count_w[h][w] - 1) h range(H) range H for w in range(W):
    answer = max(answer, count_h[h][w] + count_w[h][w] - 1) w range(W) range W answer = max(answer, count_h[h][w] + count_w[h][w] - 1) answer max(answer, count_h[h][w] + count_w[h][w] - 1) max answer count_h[h][w] + count_w[h][w] - 1 count_h[h][w] + count_w[h][w] count_h[h][w] [h] count_h h w count_w[h][w] [h] count_w h w 1 print(answer) print answer W = map(int, input().split()) map(int, input().split()) W r += 1 1 r count_h = [[0] * W for _ in range(H)] [[0] * W for _ in range(H)] count_h grid = [] [] grid r = 0 0 r count += 1 1 count count = 0 0 count answer = 0 0 answer r += 1 1 r input = sys.stdin.readline sys.stdin.readline input count = 0 0 count answer = max(answer, count_h[h][w] + count_w[h][w] - 1) max(answer, count_h[h][w] + count_w[h][w] - 1) answer H, W = map(int, input().split()) map(int, input().split()) H r += 1 1 r r += 1 1 r count_w = [[0] * W for _ in range(H)] [[0] * W for _ in range(H)] count_w count += 1 1 count count = 0 0 count r = 0 0 r count = 0 0 count
import sys

input = sys.stdin.readline

H, W = map(int, input().split())

grid = []

count_w = [[0] * W for _ in range(H)]
count_h = [[0] * W for _ in range(H)]

for _ in range(H):
  grid.append([x for x in input()])
  

for h in range(H):
  r = 0
  count = 0
  for l in range(W):
    while r < W and grid[h][r] == '.':
      r += 1
      count += 1
    count_w[h][l] = count
    if r == l:
      r += 1
      count = 0
      
for w in range(W):
  r = 0
  count = 0
  for l in range(H):
    while r < H and grid[r][w] == '.':
      r += 1
      count += 1
    count_h[l][w] = count
    if r == l:
      r += 1
      count = 0

answer = 0

for h in range(H):
  for w in range(W):
    answer = max(answer, count_h[h][w] + count_w[h][w] - 1)

print(answer)
