H, W = map(int, input().split())

m = []
for i in range(H):
    m.append(input().rstrip('\n'))

wei = [[0]*(W+1) for _ in range(H+1)]
for h in range(H):
    for w in range(W):
        if m[h][w] == '.':
             wei[h][w] = wei[h][w-1] + 1
        else:
            wei[h][w] = 0
    #reverse
    for wz in range(W-1, -1, -1):
        if wei[h][wz] > 0 and wei[h][wz] < wei[h][wz+1]:
                wei[h][wz] = wei[h][wz + 1]

hei = [[0]*(W+1) for _ in range(H+1)]
for w in range(W):
    for h in range(H):
        if m[h][w] == '.':
             hei[h][w] = hei[h-1][w] + 1
        else:
            hei[h][w] = 0

    #reverse
    for hz in range(H-1, -1, -1):
        if hei[hz][w] > 0 and hei[hz][w] < hei[hz+1][w]:
            hei[hz][w] = hei[hz+1][w]

ans = 0
for h in range(H):
    for w in range(W):
       val = wei[h][w] + hei[h][w] - 1
       if ans < val:
           ans = val

print(ans) H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W m = [] m [] for i in range(H):
    m.append(input().rstrip('\n')) i range(H) range H m.append(input().rstrip('\n')) m.append m append input().rstrip('\n') ().rstrip () input rstrip '\n' [0]*(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]*(W+1) [0] 0 W+1 W 1 wei = [[0]*(W+1) for _ in range(H+1)] wei [[0]*(W+1) for _ in range(H+1)] for h in range(H):
    for w in range(W):
        if m[h][w] == '.':
             wei[h][w] = wei[h][w-1] + 1
        else:
            wei[h][w] = 0
    #reverse
    for wz in range(W-1, -1, -1):
        if wei[h][wz] > 0 and wei[h][wz] < wei[h][wz+1]:
                wei[h][wz] = wei[h][wz + 1] h range(H) range H for w in range(W):
        if m[h][w] == '.':
             wei[h][w] = wei[h][w-1] + 1
        else:
            wei[h][w] = 0
    #reverse
     w range(W) range W if m[h][w] == '.':
             wei[h][w] = wei[h][w-1] + 1
        else:
            wei[h][w] = 0
    #reverse
     m[h][w] == '.' m[h][w] [h] m h w '.' wei[h][w] = wei[h][w-1] + 1 wei[h][w] [h] wei h w wei[h][w-1] + 1 wei[h][w-1] [h] wei h w-1 w 1 1 wei[h][w] = 0 wei[h][w] [h] wei h w 0 for wz in range(W-1, -1, -1):
        if wei[h][wz] > 0 and wei[h][wz] < wei[h][wz+1]:
                wei[h][wz] = wei[h][wz + 1] wz range(W-1, -1, -1) range W-1 W 1 -1 -1 if wei[h][wz] > 0 and wei[h][wz] < wei[h][wz+1]:
                wei[h][wz] = wei[h][wz + 1] wei[h][wz] > 0 and wei[h][wz] < wei[h][wz+1] wei[h][wz] > 0 wei[h][wz] [h] wei h wz 0 wei[h][wz] < wei[h][wz+1] wei[h][wz] [h] wei h wz wei[h][wz+1] [h] wei h wz+1 wz 1 wei[h][wz] = wei[h][wz + 1] wei[h][wz] [h] wei h wz wei[h][wz + 1] [h] wei h wz + 1 wz 1 [0]*(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]*(W+1) [0] 0 W+1 W 1 hei = [[0]*(W+1) for _ in range(H+1)] hei [[0]*(W+1) for _ in range(H+1)] for w in range(W):
    for h in range(H):
        if m[h][w] == '.':
             hei[h][w] = hei[h-1][w] + 1
        else:
            hei[h][w] = 0

    #reverse
    for hz in range(H-1, -1, -1):
        if hei[hz][w] > 0 and hei[hz][w] < hei[hz+1][w]:
            hei[hz][w] = hei[hz+1][w] w range(W) range W for h in range(H):
        if m[h][w] == '.':
             hei[h][w] = hei[h-1][w] + 1
        else:
            hei[h][w] = 0

    #reverse
     h range(H) range H if m[h][w] == '.':
             hei[h][w] = hei[h-1][w] + 1
        else:
            hei[h][w] = 0

    #reverse
     m[h][w] == '.' m[h][w] [h] m h w '.' hei[h][w] = hei[h-1][w] + 1 hei[h][w] [h] hei h w hei[h-1][w] + 1 hei[h-1][w] [h-1] hei h-1 h 1 w 1 hei[h][w] = 0 hei[h][w] [h] hei h w 0 for hz in range(H-1, -1, -1):
        if hei[hz][w] > 0 and hei[hz][w] < hei[hz+1][w]:
            hei[hz][w] = hei[hz+1][w] hz range(H-1, -1, -1) range H-1 H 1 -1 -1 if hei[hz][w] > 0 and hei[hz][w] < hei[hz+1][w]:
            hei[hz][w] = hei[hz+1][w] hei[hz][w] > 0 and hei[hz][w] < hei[hz+1][w] hei[hz][w] > 0 hei[hz][w] [hz] hei hz w 0 hei[hz][w] < hei[hz+1][w] hei[hz][w] [hz] hei hz w hei[hz+1][w] [hz+1] hei hz+1 hz 1 w hei[hz][w] = hei[hz+1][w] hei[hz][w] [hz] hei hz w hei[hz+1][w] [hz+1] hei hz+1 hz 1 w ans = 0 ans 0 for h in range(H):
    for w in range(W):
       val = wei[h][w] + hei[h][w] - 1
       if ans < val:
           ans = val h range(H) range H for w in range(W):
       val = wei[h][w] + hei[h][w] - 1
       if ans < val:
           ans = val w range(W) range W val = wei[h][w] + hei[h][w] - 1 val wei[h][w] + hei[h][w] - 1 wei[h][w] + hei[h][w] wei[h][w] [h] wei h w hei[h][w] [h] hei h w 1 if ans < val:
           ans = val ans < val ans val ans = val ans val print(ans) print ans hei = [[0]*(W+1) for _ in range(H+1)] [[0]*(W+1) for _ in range(H+1)] hei ans = 0 0 ans val = wei[h][w] + hei[h][w] - 1 wei[h][w] + hei[h][w] - 1 val wei = [[0]*(W+1) for _ in range(H+1)] [[0]*(W+1) for _ in range(H+1)] wei ans = val val ans m = [] [] m W = map(int, input().split()) map(int, input().split()) W H, W = map(int, input().split()) map(int, input().split()) H
H, W = map(int, input().split())

m = []
for i in range(H):
    m.append(input().rstrip('\n'))

wei = [[0]*(W+1) for _ in range(H+1)]
for h in range(H):
    for w in range(W):
        if m[h][w] == '.':
             wei[h][w] = wei[h][w-1] + 1
        else:
            wei[h][w] = 0
    #reverse
    for wz in range(W-1, -1, -1):
        if wei[h][wz] > 0 and wei[h][wz] < wei[h][wz+1]:
                wei[h][wz] = wei[h][wz + 1]

hei = [[0]*(W+1) for _ in range(H+1)]
for w in range(W):
    for h in range(H):
        if m[h][w] == '.':
             hei[h][w] = hei[h-1][w] + 1
        else:
            hei[h][w] = 0

    #reverse
    for hz in range(H-1, -1, -1):
        if hei[hz][w] > 0 and hei[hz][w] < hei[hz+1][w]:
            hei[hz][w] = hei[hz+1][w]

ans = 0
for h in range(H):
    for w in range(W):
       val = wei[h][w] + hei[h][w] - 1
       if ans < val:
           ans = val

print(ans)
