#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created: Jul, 12, 2020 21:40:45 by Nobody
# $Author$
# $Date$
# $URL$
__giturl__ = "$URL$"


from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
from sys import stdin
input = stdin.readline


def main():
  H, W = list(map(int, input().split()))
  G = ['#'+input()[:-1]+'#' for _ in range(H)]
  G = ['#'*(W+2)] + G + ['#'*(W+2)]

  # print(G)
  U = [[0]*(W+2) for _ in range(H+2)]
  D = [[0]*(W+2) for _ in range(H+2)]
  L = [[0]*(W+2) for _ in range(H+2)]
  R = [[0]*(W+2) for _ in range(H+2)]
  # U and L
  for h in range(1, H+1):
    for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

  for h in range(H, 0, -1):
    for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

  max_ = 0
  for h in range(1, H+1):
    for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

  print(max_ - 3)


if(__name__ == '__main__'):
  main() __giturl__ = "$URL$" __giturl__ "$URL$" from collections import defaultdict from collections import deque from collections import OrderedDict import itertools itertools from sys import stdin input = stdin.readline input stdin.readline stdin readline def main():
  H, W = list(map(int, input().split()))
  G = ['#'+input()[:-1]+'#' for _ in range(H)]
  G = ['#'*(W+2)] + G + ['#'*(W+2)]

  # print(G)
  U = [[0]*(W+2) for _ in range(H+2)]
  D = [[0]*(W+2) for _ in range(H+2)]
  L = [[0]*(W+2) for _ in range(H+2)]
  R = [[0]*(W+2) for _ in range(H+2)]
  # U and L
  for h in range(1, H+1):
    for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

  for h in range(H, 0, -1):
    for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

  max_ = 0
  for h in range(1, H+1):
    for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

  print(max_ - 3) main H, W = list(map(int, input().split())) H list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split W '#'+input()[:-1]+'#' for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) '#'+input()[:-1]+'#' '#'+input()[:-1] '#' input()[:-1] () input :-1 -1 '#' G = ['#'+input()[:-1]+'#' for _ in range(H)] G ['#'+input()[:-1]+'#' for _ in range(H)] G = ['#'*(W+2)] + G + ['#'*(W+2)] G ['#'*(W+2)] + G + ['#'*(W+2)] ['#'*(W+2)] + G ['#'*(W+2)] '#'*(W+2) '#' W+2 W 2 G ['#'*(W+2)] '#'*(W+2) '#' W+2 W 2 [0]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [0]*(W+2) [0] 0 W+2 W 2 U = [[0]*(W+2) for _ in range(H+2)] U [[0]*(W+2) for _ in range(H+2)] [0]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [0]*(W+2) [0] 0 W+2 W 2 D = [[0]*(W+2) for _ in range(H+2)] D [[0]*(W+2) for _ in range(H+2)] [0]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [0]*(W+2) [0] 0 W+2 W 2 L = [[0]*(W+2) for _ in range(H+2)] L [[0]*(W+2) for _ in range(H+2)] [0]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [0]*(W+2) [0] 0 W+2 W 2 R = [[0]*(W+2) for _ in range(H+2)] R [[0]*(W+2) for _ in range(H+2)] for h in range(1, H+1):
    for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

   h range(1, H+1) range 1 H+1 H 1 for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

   w range(1, W+1) range 1 W+1 W 1 if G[h][w] == '#':
        continue
       G[h][w] == '#' G[h][w] [h] G h w '#' continue U[h][w] = U[h-1][w] + 1 U[h][w] [h] U h w U[h-1][w] + 1 U[h-1][w] [h-1] U h-1 h 1 w 1 L[h][w] = L[h][w-1] + 1 L[h][w] [h] L h w L[h][w-1] + 1 L[h][w-1] [h] L h w-1 w 1 1 for h in range(H, 0, -1):
    for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

   h range(H, 0, -1) range H 0 -1 for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

   w range(W, 0, -1) range W 0 -1 if G[h][w] == '#':
        continue
       G[h][w] == '#' G[h][w] [h] G h w '#' continue D[h][w] = D[h+1][w] + 1 D[h][w] [h] D h w D[h+1][w] + 1 D[h+1][w] [h+1] D h+1 h 1 w 1 R[h][w] = R[h][w+1] + 1 R[h][w] [h] R h w R[h][w+1] + 1 R[h][w+1] [h] R h w+1 w 1 1 max_ = 0 max_ 0 for h in range(1, H+1):
    for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

   h range(1, H+1) range 1 H+1 H 1 for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

   w range(1, W+1) range 1 W+1 W 1 max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w]) max_ max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w]) max max_ U[h][w]+L[h][w]+D[h][w]+R[h][w] U[h][w]+L[h][w]+D[h][w] U[h][w]+L[h][w] U[h][w] [h] U h w L[h][w] [h] L h w D[h][w] [h] D h w R[h][w] [h] R h w print(max_ - 3) print max_ - 3 max_ 3 if(__name__ == '__main__'):
  main() __name__ == '__main__' __name__ '__main__' main() main input = stdin.readline stdin.readline input def main():
  H, W = list(map(int, input().split()))
  G = ['#'+input()[:-1]+'#' for _ in range(H)]
  G = ['#'*(W+2)] + G + ['#'*(W+2)]

  # print(G)
  U = [[0]*(W+2) for _ in range(H+2)]
  D = [[0]*(W+2) for _ in range(H+2)]
  L = [[0]*(W+2) for _ in range(H+2)]
  R = [[0]*(W+2) for _ in range(H+2)]
  # U and L
  for h in range(1, H+1):
    for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

  for h in range(H, 0, -1):
    for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

  max_ = 0
  for h in range(1, H+1):
    for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

  print(max_ - 3) def main():
  H, W = list(map(int, input().split()))
  G = ['#'+input()[:-1]+'#' for _ in range(H)]
  G = ['#'*(W+2)] + G + ['#'*(W+2)]

  # print(G)
  U = [[0]*(W+2) for _ in range(H+2)]
  D = [[0]*(W+2) for _ in range(H+2)]
  L = [[0]*(W+2) for _ in range(H+2)]
  R = [[0]*(W+2) for _ in range(H+2)]
  # U and L
  for h in range(1, H+1):
    for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

  for h in range(H, 0, -1):
    for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

  max_ = 0
  for h in range(1, H+1):
    for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

  print(max_ - 3) main
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created: Jul, 12, 2020 21:40:45 by Nobody
# $Author$
# $Date$
# $URL$
__giturl__ = "$URL$"


from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
from sys import stdin
input = stdin.readline


def main():
  H, W = list(map(int, input().split()))
  G = ['#'+input()[:-1]+'#' for _ in range(H)]
  G = ['#'*(W+2)] + G + ['#'*(W+2)]

  # print(G)
  U = [[0]*(W+2) for _ in range(H+2)]
  D = [[0]*(W+2) for _ in range(H+2)]
  L = [[0]*(W+2) for _ in range(H+2)]
  R = [[0]*(W+2) for _ in range(H+2)]
  # U and L
  for h in range(1, H+1):
    for w in range(1, W+1):
      if G[h][w] == '#':
        continue
      U[h][w] = U[h-1][w] + 1
      L[h][w] = L[h][w-1] + 1

  for h in range(H, 0, -1):
    for w in range(W, 0, -1):
      if G[h][w] == '#':
        continue
      D[h][w] = D[h+1][w] + 1
      R[h][w] = R[h][w+1] + 1

  max_ = 0
  for h in range(1, H+1):
    for w in range(1, W+1):
      max_ = max(max_, U[h][w]+L[h][w]+D[h][w]+R[h][w])

  print(max_ - 3)


if(__name__ == '__main__'):
  main()
