h,w = map(int,input().split())
g = []
for i in range(h):
    s = list(input())
    g.append(s)


#left
left = [[0]*w for i in range(h)]
for i in range(h):
    cnt = 0
    for j in range(w):
        if g[i][j] == ".":
            cnt += 1
            left[i][j] =cnt
        else:
            cnt = 0

#right
right = [[0]*w for i in range(h)]
for i in range(h-1,-1,-1):
    cnt = 0
    for j in range(w-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            right[i][j] =cnt
        else:
            cnt = 0
#top
top = [[0]*w for i in range(h)]
for j in range(w):
    cnt = 0
    for i in range(h):
        if g[i][j] == ".":
            cnt += 1
            top[i][j] =cnt
        else:
            cnt = 0
#down
down = [[0]*w for i in range(h)]
for j in range(w-1,-1,-1):
    cnt = 0
    for i in range(h-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            down[i][j] =cnt
        else:
            cnt = 0

maxans = -1
for i in range(h):
  for j in range(w):
    if g[i][j] =="#":
      continue
    ans = left[i][j]+right[i][j]+top[i][j]+down[i][j]-3
    maxans = max(ans,maxans)
    
print(maxans) h,w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w g = [] g [] for i in range(h):
    s = list(input())
    g.append(s)


#left i range(h) range h s = list(input()) s list(input()) list input() input g.append(s) g.append g append s [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 left = [[0]*w for i in range(h)] left [[0]*w for i in range(h)] for i in range(h):
    cnt = 0
    for j in range(w):
        if g[i][j] == ".":
            cnt += 1
            left[i][j] =cnt
        else:
            cnt = 0

#right i range(h) range h cnt = 0 cnt 0 for j in range(w):
        if g[i][j] == ".":
            cnt += 1
            left[i][j] =cnt
        else:
            cnt = 0

#right j range(w) range w if g[i][j] == ".":
            cnt += 1
            left[i][j] =cnt
        else:
            cnt = 0

#right g[i][j] == "." g[i][j] [i] g i j "." cnt += 1 cnt 1 left[i][j] =cnt left[i][j] [i] left i j cnt cnt = 0 cnt 0 [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 right = [[0]*w for i in range(h)] right [[0]*w for i in range(h)] for i in range(h-1,-1,-1):
    cnt = 0
    for j in range(w-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            right[i][j] =cnt
        else:
            cnt = 0
#top i range(h-1,-1,-1) range h-1 h 1 -1 -1 cnt = 0 cnt 0 for j in range(w-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            right[i][j] =cnt
        else:
            cnt = 0
#top j range(w-1,-1,-1) range w-1 w 1 -1 -1 if g[i][j] == ".":
            cnt += 1
            right[i][j] =cnt
        else:
            cnt = 0
#top g[i][j] == "." g[i][j] [i] g i j "." cnt += 1 cnt 1 right[i][j] =cnt right[i][j] [i] right i j cnt cnt = 0 cnt 0 [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 top = [[0]*w for i in range(h)] top [[0]*w for i in range(h)] for j in range(w):
    cnt = 0
    for i in range(h):
        if g[i][j] == ".":
            cnt += 1
            top[i][j] =cnt
        else:
            cnt = 0
#down j range(w) range w cnt = 0 cnt 0 for i in range(h):
        if g[i][j] == ".":
            cnt += 1
            top[i][j] =cnt
        else:
            cnt = 0
#down i range(h) range h if g[i][j] == ".":
            cnt += 1
            top[i][j] =cnt
        else:
            cnt = 0
#down g[i][j] == "." g[i][j] [i] g i j "." cnt += 1 cnt 1 top[i][j] =cnt top[i][j] [i] top i j cnt cnt = 0 cnt 0 [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 down = [[0]*w for i in range(h)] down [[0]*w for i in range(h)] for j in range(w-1,-1,-1):
    cnt = 0
    for i in range(h-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            down[i][j] =cnt
        else:
            cnt = 0 j range(w-1,-1,-1) range w-1 w 1 -1 -1 cnt = 0 cnt 0 for i in range(h-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            down[i][j] =cnt
        else:
            cnt = 0 i range(h-1,-1,-1) range h-1 h 1 -1 -1 if g[i][j] == ".":
            cnt += 1
            down[i][j] =cnt
        else:
            cnt = 0 g[i][j] == "." g[i][j] [i] g i j "." cnt += 1 cnt 1 down[i][j] =cnt down[i][j] [i] down i j cnt cnt = 0 cnt 0 maxans = -1 maxans -1 for i in range(h):
  for j in range(w):
    if g[i][j] =="#":
      continue
    ans = left[i][j]+right[i][j]+top[i][j]+down[i][j]-3
    maxans = max(ans,maxans)
     i range(h) range h for j in range(w):
    if g[i][j] =="#":
      continue
    ans = left[i][j]+right[i][j]+top[i][j]+down[i][j]-3
    maxans = max(ans,maxans)
     j range(w) range w if g[i][j] =="#":
      continue
     g[i][j] =="#" g[i][j] [i] g i j "#" continue ans = left[i][j]+right[i][j]+top[i][j]+down[i][j]-3 ans left[i][j]+right[i][j]+top[i][j]+down[i][j]-3 left[i][j]+right[i][j]+top[i][j]+down[i][j] left[i][j]+right[i][j]+top[i][j] left[i][j]+right[i][j] left[i][j] [i] left i j right[i][j] [i] right i j top[i][j] [i] top i j down[i][j] [i] down i j 3 maxans = max(ans,maxans) maxans max(ans,maxans) max ans maxans print(maxans) print maxans cnt += 1 1 cnt cnt += 1 1 cnt cnt = 0 0 cnt down = [[0]*w for i in range(h)] [[0]*w for i in range(h)] down cnt = 0 0 cnt g = [] [] g left = [[0]*w for i in range(h)] [[0]*w for i in range(h)] left cnt = 0 0 cnt w = map(int,input().split()) map(int,input().split()) w cnt += 1 1 cnt cnt = 0 0 cnt top = [[0]*w for i in range(h)] [[0]*w for i in range(h)] top cnt = 0 0 cnt right = [[0]*w for i in range(h)] [[0]*w for i in range(h)] right maxans = max(ans,maxans) max(ans,maxans) maxans s = list(input()) list(input()) s maxans = -1 -1 maxans h,w = map(int,input().split()) map(int,input().split()) h cnt += 1 1 cnt cnt = 0 0 cnt cnt = 0 0 cnt ans = left[i][j]+right[i][j]+top[i][j]+down[i][j]-3 left[i][j]+right[i][j]+top[i][j]+down[i][j]-3 ans cnt = 0 0 cnt
h,w = map(int,input().split())
g = []
for i in range(h):
    s = list(input())
    g.append(s)


#left
left = [[0]*w for i in range(h)]
for i in range(h):
    cnt = 0
    for j in range(w):
        if g[i][j] == ".":
            cnt += 1
            left[i][j] =cnt
        else:
            cnt = 0

#right
right = [[0]*w for i in range(h)]
for i in range(h-1,-1,-1):
    cnt = 0
    for j in range(w-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            right[i][j] =cnt
        else:
            cnt = 0
#top
top = [[0]*w for i in range(h)]
for j in range(w):
    cnt = 0
    for i in range(h):
        if g[i][j] == ".":
            cnt += 1
            top[i][j] =cnt
        else:
            cnt = 0
#down
down = [[0]*w for i in range(h)]
for j in range(w-1,-1,-1):
    cnt = 0
    for i in range(h-1,-1,-1):
        if g[i][j] == ".":
            cnt += 1
            down[i][j] =cnt
        else:
            cnt = 0

maxans = -1
for i in range(h):
  for j in range(w):
    if g[i][j] =="#":
      continue
    ans = left[i][j]+right[i][j]+top[i][j]+down[i][j]-3
    maxans = max(ans,maxans)
    
print(maxans)