### BUGGY CODE ###

h, w  = map(int, input().split())
slist = [input() for i in range(h)]
## 1.横→縦
# 横方向maxとなるj
max_empty_yoko = 0
max_idx_yoko = [None, None, None] #[istart, iend, j]
for j, s in enumerate(slist):
  tmp_max_empty = 0
  tmp_max_idxj =[None, None, None]
  for index in range(len(s)):
    if s[index] == '.':
      if tmp_max_empty == 0:
        tmp_max_idxj[0] = index
      tmp_max_empty += 1
    else:
      if max_empty_yoko < tmp_max_empty:
        max_empty_yoko = tmp_max_empty
        max_idx_yoko[0] = tmp_max_idxj[0]
        max_idx_yoko[1] = index-1
        max_idx_yoko[2] = j
      tmp_max_empty = 0
      tmp_max_idxj = [None, None, None]
        

  if max_empty_yoko < tmp_max_empty:
    max_empty_yoko = tmp_max_empty
    max_idx_yoko[0] = tmp_max_idxj[0]
    max_idx_yoko[1] = index-1
    max_idx_yoko[2] = j

max_empty_tate = 0
max_idx_tate = [None, None, None]
for i in range(max_idx_yoko[0],max_idx_yoko[1]):
  tmp_max_empty = 0
  tmp_max_idxi = [None, None, None]
  for j in range(h):
    if slist[j][i] == '.':
      if tmp_max_empty == 0:
        tmp_max_idxi[0] = j
      tmp_max_empty += 1
    else:
      if max_empty_tate < tmp_max_empty:
        max_empty_tate = tmp_max_empty
        max_idx_tate[0] = tmp_max_idxi[0]
        max_idx_tate[1] = j-1
        max_idx_tate[2] = i
      tmp_max_empty = 0
      tmp_max_idxi = [None, None, None]

  if max_empty_tate < tmp_max_empty:
    max_empty_tate = tmp_max_empty
    max_idx_tate[0] = tmp_max_idxi[0]
    max_idx_tate[1] = j
    max_idx_tate[2] = i

# ans1
ans1 = max_empty_yoko+max_empty_tate-1

## 2.縦→横
# 縦方向maxとなるi
max_empty_tate = 0
max_idx_tate = [None, None, None]
for i in range(w):
  tmp_max_empty = 0
  tmp_max_idxi = [None, None, None]
  for j in range(h):
    if slist[j][i] == '.':
      if tmp_max_empty == 0:
        tmp_max_idxi[0] = j
      tmp_max_empty += 1
    else:
      if max_empty_tate < tmp_max_empty:
        max_empty_tate = tmp_max_empty
        max_idx_tate[0] = tmp_max_idxi[0]
        max_idx_tate[1] = j-1
        max_idx_tate[2] = i
      tmp_max_empty = 0
      tmp_max_idxi = [None, None, None]

  if max_empty_tate < tmp_max_empty:
    max_empty_tate = tmp_max_empty
    max_idx_tate[0] = tmp_max_idxi[0]
    max_idx_tate[1] = j
    max_idx_tate[2] = i

# 横方向maxとなるj
max_empty_yoko = 0
max_idx_yoko = [None, None, None] #[istart, iend, j]
for j, s in enumerate(slist):
  if j < max_idx_tate[0] and  max_idx_tate[1] < j:
    continue
  tmp_max_empty = 0
  tmp_max_idxj =[None, None, None]
  for index in range(len(s)):
    if s[index] == '.':
      if tmp_max_empty == 0:
        tmp_max_idxj[0] = index
      tmp_max_empty += 1
    else:
      if max_empty_yoko < tmp_max_empty:
        max_empty_yoko = tmp_max_empty
        max_idx_yoko[0] = tmp_max_idxj[0]
        max_idx_yoko[1] = index-1
        max_idx_yoko[2] = j
      tmp_max_empty = 0
      tmp_max_idxj = [None, None, None]
        

  if max_empty_yoko < tmp_max_empty:
    max_empty_yoko = tmp_max_empty
    max_idx_yoko[0] = tmp_max_idxj[0]
    max_idx_yoko[1] = index-1
    max_idx_yoko[2] = j
# ans2
ans2 = max_empty_yoko+max_empty_tate-1

## ans
print(max(ans1,ans2))

### FIXED CODE ###

import sys

H,W = map(int,input().split())
grids = [[s for s in sys.stdin.readline()] for _ in range(H)]

col_cnt = [[0 for _ in range(W)]for _ in range(H)]
for i in range(W):
  tmp_cnt = 0
  prvjj = 0
  for j in range(H):
    if grids[j][i] == '.':
      tmp_cnt += 1
    else:
      col_cnt[j][i] = 0
      for jj in range(prvjj,j):
        col_cnt[jj][i] = tmp_cnt
      prvjj = j+1
      tmp_cnt = 0
  for jj in range(prvjj,H):
    col_cnt[jj][i] = tmp_cnt

ans = -float('inf')
for j in range(H):
  tmp_cnt = 0
  prvii = 0
  for i in range(W):
    if grids[j][i] == '.':
      tmp_cnt += 1
    else:
      for ii in range(prvii,i):
        ans = max(ans,col_cnt[j][ii]+tmp_cnt-1)
      prvii = i+1
      tmp_cnt = 0

  for ii in range(prvii,W):
    ans = max(ans,col_cnt[j][ii]+tmp_cnt-1)

print(ans)