import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

H, W = rl()
S = []
for i in range(H):
  s = rs()
  S.append(s + '#')
S.append('#'*(W+1))

tab = [[0 for _ in range(W+1)] for _ in range(H+1)]

for i in range(H):
  k = 0
  prev = -1
  for j in range(W+1):
    if S[i][j] == '#':
      n = j-prev-1
      while k < j:
        tab[i][k] += n
        k += 1
      tab[i][k] = 0
      k += 1
      prev = j

for j in range(W):
  k = 0
  prev = -1
  for i in range(H+1):
    if S[i][j] == '#':
      n = i-prev-1
      while k < i:
        tab[k][j] += n - 1
        k += 1
      tab[k][j] = 0
      k += 1
      prev = i

ans = 0
for i in range(H):
  for j in range(W):
    ans = max(ans, tab[i][j])
print(ans) import sys, math sys math from collections import defaultdict, deque, Counter from bisect import bisect_left, bisect_right from itertools import combinations, permutations, product from heapq import heappush, heappop from functools import lru_cache input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline rs = lambda: input().strip() rs lambda: input().strip() input().strip() ().strip () input strip ri = lambda: int(input()) ri lambda: int(input()) int(input()) int input() input rl = lambda: list(map(int, input().split())) rl lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split mod = 1000000007 mod 1000000007 sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 H, W = rl() H rl() rl W S = [] S [] for i in range(H):
  s = rs()
  S.append(s + '#') i range(H) range H s = rs() s rs() rs S.append(s + '#') S.append S append s + '#' s '#' S.append('#'*(W+1)) S.append S append '#'*(W+1) '#' W+1 W 1 [0 for _ in range(W+1)] for _ in range(H+1) for _ in range(H+1) _ range(H+1) range H+1 H 1 for _ in range(H+1) [0 for _ in range(W+1)] tab = [[0 for _ in range(W+1)] for _ in range(H+1)] tab [[0 for _ in range(W+1)] for _ in range(H+1)] for i in range(H):
  k = 0
  prev = -1
  for j in range(W+1):
    if S[i][j] == '#':
      n = j-prev-1
      while k < j:
        tab[i][k] += n
        k += 1
      tab[i][k] = 0
      k += 1
      prev = j i range(H) range H k = 0 k 0 prev = -1 prev -1 for j in range(W+1):
    if S[i][j] == '#':
      n = j-prev-1
      while k < j:
        tab[i][k] += n
        k += 1
      tab[i][k] = 0
      k += 1
      prev = j j range(W+1) range W+1 W 1 if S[i][j] == '#':
      n = j-prev-1
      while k < j:
        tab[i][k] += n
        k += 1
      tab[i][k] = 0
      k += 1
      prev = j S[i][j] == '#' S[i][j] [i] S i j '#' n = j-prev-1 n j-prev-1 j-prev j prev 1 while k < j:
        tab[i][k] += n
        k += 1
       k < j k j tab[i][k] += n tab[i][k] [i] tab i k n k += 1 k 1 tab[i][k] = 0 tab[i][k] [i] tab i k 0 k += 1 k 1 prev = j prev j for j in range(W):
  k = 0
  prev = -1
  for i in range(H+1):
    if S[i][j] == '#':
      n = i-prev-1
      while k < i:
        tab[k][j] += n - 1
        k += 1
      tab[k][j] = 0
      k += 1
      prev = i j range(W) range W k = 0 k 0 prev = -1 prev -1 for i in range(H+1):
    if S[i][j] == '#':
      n = i-prev-1
      while k < i:
        tab[k][j] += n - 1
        k += 1
      tab[k][j] = 0
      k += 1
      prev = i i range(H+1) range H+1 H 1 if S[i][j] == '#':
      n = i-prev-1
      while k < i:
        tab[k][j] += n - 1
        k += 1
      tab[k][j] = 0
      k += 1
      prev = i S[i][j] == '#' S[i][j] [i] S i j '#' n = i-prev-1 n i-prev-1 i-prev i prev 1 while k < i:
        tab[k][j] += n - 1
        k += 1
       k < i k i tab[k][j] += n - 1 tab[k][j] [k] tab k j n - 1 n 1 k += 1 k 1 tab[k][j] = 0 tab[k][j] [k] tab k j 0 k += 1 k 1 prev = i prev i ans = 0 ans 0 for i in range(H):
  for j in range(W):
    ans = max(ans, tab[i][j]) i range(H) range H for j in range(W):
    ans = max(ans, tab[i][j]) j range(W) range W ans = max(ans, tab[i][j]) ans max(ans, tab[i][j]) max ans tab[i][j] [i] tab i j print(ans) print ans mod = 1000000007 1000000007 mod ri = lambda: int(input()) lambda: int(input()) ri ans = max(ans, tab[i][j]) max(ans, tab[i][j]) ans prev = i i prev ans = 0 0 ans k = 0 0 k rl = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) rl prev = -1 -1 prev n = j-prev-1 j-prev-1 n W = rl() rl() W s = rs() rs() s rs = lambda: input().strip() lambda: input().strip() rs n = i-prev-1 i-prev-1 n input = sys.stdin.readline sys.stdin.readline input k += 1 1 k prev = -1 -1 prev k = 0 0 k k += 1 1 k k += 1 1 k k += 1 1 k S = [] [] S prev = j j prev H, W = rl() rl() H tab = [[0 for _ in range(W+1)] for _ in range(H+1)] [[0 for _ in range(W+1)] for _ in range(H+1)] tab
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

H, W = rl()
S = []
for i in range(H):
  s = rs()
  S.append(s + '#')
S.append('#'*(W+1))

tab = [[0 for _ in range(W+1)] for _ in range(H+1)]

for i in range(H):
  k = 0
  prev = -1
  for j in range(W+1):
    if S[i][j] == '#':
      n = j-prev-1
      while k < j:
        tab[i][k] += n
        k += 1
      tab[i][k] = 0
      k += 1
      prev = j

for j in range(W):
  k = 0
  prev = -1
  for i in range(H+1):
    if S[i][j] == '#':
      n = i-prev-1
      while k < i:
        tab[k][j] += n - 1
        k += 1
      tab[k][j] = 0
      k += 1
      prev = i

ans = 0
for i in range(H):
  for j in range(W):
    ans = max(ans, tab[i][j])
print(ans)
