H,W=map(int,input().split())
S=[input() for _ in range(H)]

res=[[] for i in range(H)]
for i in range(H):
  count=0
  for j in range(W):
    if S[i][j]=='#':
      if j != 0 and S[i][j-1]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == W-1:
        res[i].append(count)

cum = [[] for i in range(len(res))]
for i in range(len(res)):
  for j in range(len(res[i])):
    if res[i][j]==0:cum[i].append(0)
    else:cum[i].extend([res[i][j]]*res[i][j])

res=[[] for i in range(W)]
for i in range(W):
  count=0
  for j in range(H):
    if S[j][i]=='#':
      if j != 0 and S[j-1][i]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == H-1:
        res[i].append(count)

cum2 = [[] for i in range(len(res))]
for i in range(len(res)):
  for j in range(len(res[i])):
    if res[i][j]==0:cum2[i].append(0)
    else:cum2[i].extend([res[i][j]]*res[i][j])

ans=0
for i in range(H):
  for j in range(W):
    tmp = cum[i][j]+cum2[j][i]-1
    if tmp > ans:ans=tmp

print(ans) H,W=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W input() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) input() input S=[input() for _ in range(H)] S [input() for _ in range(H)] [] for i in range(H) for i in range(H) i range(H) range H for i in range(H) [] res=[[] for i in range(H)] res [[] for i in range(H)] for i in range(H):
  count=0
  for j in range(W):
    if S[i][j]=='#':
      if j != 0 and S[i][j-1]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == W-1:
        res[i].append(count) i range(H) range H count=0 count 0 for j in range(W):
    if S[i][j]=='#':
      if j != 0 and S[i][j-1]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == W-1:
        res[i].append(count) j range(W) range W if S[i][j]=='#':
      if j != 0 and S[i][j-1]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == W-1:
        res[i].append(count) S[i][j]=='#' S[i][j] [i] S i j '#' if j != 0 and S[i][j-1]=='.':
        res[i].append(count)
       j != 0 and S[i][j-1]=='.' j != 0 j 0 S[i][j-1]=='.' S[i][j-1] [i] S i j-1 j 1 '.' res[i].append(count) [i].append [i] res i append count res[i].append(0) [i].append [i] res i append 0 count=0 count 0 continue count += 1 count 1 if j == W-1:
        res[i].append(count) j == W-1 j W-1 W 1 res[i].append(count) [i].append [i] res i append count [] for i in range(len(res)) for i in range(len(res)) i range(len(res)) range len(res) len res for i in range(len(res)) [] cum = [[] for i in range(len(res))] cum [[] for i in range(len(res))] for i in range(len(res)):
  for j in range(len(res[i])):
    if res[i][j]==0:cum[i].append(0)
    else:cum[i].extend([res[i][j]]*res[i][j]) i range(len(res)) range len(res) len res for j in range(len(res[i])):
    if res[i][j]==0:cum[i].append(0)
    else:cum[i].extend([res[i][j]]*res[i][j]) j range(len(res[i])) range len(res[i]) len res[i] res i if res[i][j]==0:cum[i].append(0)
    else:cum[i].extend([res[i][j]]*res[i][j]) res[i][j]==0 res[i][j] [i] res i j 0 [] for i in range(W) for i in range(W) i range(W) range W for i in range(W) [] res=[[] for i in range(W)] res [[] for i in range(W)] for i in range(W):
  count=0
  for j in range(H):
    if S[j][i]=='#':
      if j != 0 and S[j-1][i]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == H-1:
        res[i].append(count) i range(W) range W count=0 count 0 for j in range(H):
    if S[j][i]=='#':
      if j != 0 and S[j-1][i]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == H-1:
        res[i].append(count) j range(H) range H if S[j][i]=='#':
      if j != 0 and S[j-1][i]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == H-1:
        res[i].append(count) S[j][i]=='#' S[j][i] [j] S j i '#' if j != 0 and S[j-1][i]=='.':
        res[i].append(count)
       j != 0 and S[j-1][i]=='.' j != 0 j 0 S[j-1][i]=='.' S[j-1][i] [j-1] S j-1 j 1 i '.' res[i].append(count) [i].append [i] res i append count res[i].append(0) [i].append [i] res i append 0 count=0 count 0 continue count += 1 count 1 if j == H-1:
        res[i].append(count) j == H-1 j H-1 H 1 res[i].append(count) [i].append [i] res i append count [] for i in range(len(res)) for i in range(len(res)) i range(len(res)) range len(res) len res for i in range(len(res)) [] cum2 = [[] for i in range(len(res))] cum2 [[] for i in range(len(res))] for i in range(len(res)):
  for j in range(len(res[i])):
    if res[i][j]==0:cum2[i].append(0)
    else:cum2[i].extend([res[i][j]]*res[i][j]) i range(len(res)) range len(res) len res for j in range(len(res[i])):
    if res[i][j]==0:cum2[i].append(0)
    else:cum2[i].extend([res[i][j]]*res[i][j]) j range(len(res[i])) range len(res[i]) len res[i] res i if res[i][j]==0:cum2[i].append(0)
    else:cum2[i].extend([res[i][j]]*res[i][j]) res[i][j]==0 res[i][j] [i] res i j 0 ans=0 ans 0 for i in range(H):
  for j in range(W):
    tmp = cum[i][j]+cum2[j][i]-1
    if tmp > ans:ans=tmp i range(H) range H for j in range(W):
    tmp = cum[i][j]+cum2[j][i]-1
    if tmp > ans:ans=tmp j range(W) range W tmp = cum[i][j]+cum2[j][i]-1 tmp cum[i][j]+cum2[j][i]-1 cum[i][j]+cum2[j][i] cum[i][j] [i] cum i j cum2[j][i] [j] cum2 j i 1 if tmp > ans:ans tmp > ans tmp ans print(ans) print ans count += 1 1 count count=0 0 count cum = [[] for i in range(len(res))] [[] for i in range(len(res))] cum count=0 0 count count += 1 1 count W=map(int,input().split()) map(int,input().split()) W H,W=map(int,input().split()) map(int,input().split()) H res=[[] for i in range(H)] [[] for i in range(H)] res tmp = cum[i][j]+cum2[j][i]-1 cum[i][j]+cum2[j][i]-1 tmp count=0 0 count S=[input() for _ in range(H)] [input() for _ in range(H)] S count=0 0 count cum2 = [[] for i in range(len(res))] [[] for i in range(len(res))] cum2 res=[[] for i in range(W)] [[] for i in range(W)] res ans=0 0 ans
H,W=map(int,input().split())
S=[input() for _ in range(H)]

res=[[] for i in range(H)]
for i in range(H):
  count=0
  for j in range(W):
    if S[i][j]=='#':
      if j != 0 and S[i][j-1]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == W-1:
        res[i].append(count)

cum = [[] for i in range(len(res))]
for i in range(len(res)):
  for j in range(len(res[i])):
    if res[i][j]==0:cum[i].append(0)
    else:cum[i].extend([res[i][j]]*res[i][j])

res=[[] for i in range(W)]
for i in range(W):
  count=0
  for j in range(H):
    if S[j][i]=='#':
      if j != 0 and S[j-1][i]=='.':
        res[i].append(count)
      res[i].append(0)
      count=0
      continue
    else:
      count += 1
      if j == H-1:
        res[i].append(count)

cum2 = [[] for i in range(len(res))]
for i in range(len(res)):
  for j in range(len(res[i])):
    if res[i][j]==0:cum2[i].append(0)
    else:cum2[i].extend([res[i][j]]*res[i][j])

ans=0
for i in range(H):
  for j in range(W):
    tmp = cum[i][j]+cum2[j][i]-1
    if tmp > ans:ans=tmp

print(ans)