H, W = map(int, input().split())
HW = [0] * H
for i in range(H):
  HW[i] = str(input())
  
#縦  
T = [[0] * W for i in range(H)]  
for i in range(H):#4000000
  now = 0
  for j in range(W):
    if HW[i][j] == "#":
      T[i][j] = 0
      now = 0
    else:
      now += 1
      T[i][j] = now
      
  now = 0    
  for j in range(1, W + 1):
    if T[i][-j] == 0:
      now = 0
    elif now == 0:
      now = T[i][-j]
    else:
      T[i][-j] = now
    #print(i, now)  
  
#print(T)

#横
Y = [[0] * W for i in range(H)]  
for j in range(W):#4000000
  now = 0
  for i in range(H):
    if HW[i][j] == "#":
      Y[i][j] = 0
      now = 0
    else:
      now += 1
      Y[i][j] = now
      
  now = 0    
  for i in range(1, H + 1):
    if Y[-i][j] == 0:
      now = 0
    elif now == 0:
      now = Y[-i][j]
    else:
      Y[-i][j] = now
    #print(i, now)      
#print(Y)

ans = 0
for i in range(H):
  for j in range(W):
    if T[i][j] != 0 and Y[i][j] != 0:
      ans = max(ans, T[i][j] + Y[i][j] - 1)
      
print(ans)      
     H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W HW = [0] * H HW [0] * H [0] 0 H for i in range(H):
  HW[i] = str(input())
  
#縦   i range(H) range H HW[i] = str(input()) HW[i] HW i str(input()) str input() input [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 T = [[0] * W for i in range(H)] T [[0] * W for i in range(H)] for i in range(H):#4000000
  now = 0
  for j in range(W):
    if HW[i][j] == "#":
      T[i][j] = 0
      now = 0
    else:
      now += 1
      T[i][j] = now
      
  now = 0    
  for j in range(1, W + 1):
    if T[i][-j] == 0:
      now = 0
    elif now == 0:
      now = T[i][-j]
    else:
      T[i][-j] = now
    #print(i, now)  
  
#print(T)

#横 i range(H) range H now = 0 now 0 for j in range(W):
    if HW[i][j] == "#":
      T[i][j] = 0
      now = 0
    else:
      now += 1
      T[i][j] = now
      
   j range(W) range W if HW[i][j] == "#":
      T[i][j] = 0
      now = 0
    else:
      now += 1
      T[i][j] = now
      
   HW[i][j] == "#" HW[i][j] [i] HW i j "#" T[i][j] = 0 T[i][j] [i] T i j 0 now = 0 now 0 now += 1 now 1 T[i][j] = now T[i][j] [i] T i j now now = 0 now 0 for j in range(1, W + 1):
    if T[i][-j] == 0:
      now = 0
    elif now == 0:
      now = T[i][-j]
    else:
      T[i][-j] = now
    #print(i, now)  
  
#print(T)

#横 j range(1, W + 1) range 1 W + 1 W 1 if T[i][-j] == 0:
      now = 0
    elif now == 0:
      now = T[i][-j]
    else:
      T[i][-j] = now
    #print(i, now)  
  
#print(T)

#横 T[i][-j] == 0 T[i][-j] [i] T i -j j 0 now = 0 now 0 elif now == 0:
      now = T[i][-j]
     now == 0 now 0 now = T[i][-j] now T[i][-j] [i] T i -j j T[i][-j] = now T[i][-j] [i] T i -j j now [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 Y = [[0] * W for i in range(H)] Y [[0] * W for i in range(H)] for j in range(W):#4000000
  now = 0
  for i in range(H):
    if HW[i][j] == "#":
      Y[i][j] = 0
      now = 0
    else:
      now += 1
      Y[i][j] = now
      
  now = 0    
  for i in range(1, H + 1):
    if Y[-i][j] == 0:
      now = 0
    elif now == 0:
      now = Y[-i][j]
    else:
      Y[-i][j] = now
    #print(i, now)      
#print(Y) j range(W) range W now = 0 now 0 for i in range(H):
    if HW[i][j] == "#":
      Y[i][j] = 0
      now = 0
    else:
      now += 1
      Y[i][j] = now
      
   i range(H) range H if HW[i][j] == "#":
      Y[i][j] = 0
      now = 0
    else:
      now += 1
      Y[i][j] = now
      
   HW[i][j] == "#" HW[i][j] [i] HW i j "#" Y[i][j] = 0 Y[i][j] [i] Y i j 0 now = 0 now 0 now += 1 now 1 Y[i][j] = now Y[i][j] [i] Y i j now now = 0 now 0 for i in range(1, H + 1):
    if Y[-i][j] == 0:
      now = 0
    elif now == 0:
      now = Y[-i][j]
    else:
      Y[-i][j] = now
    #print(i, now)      
#print(Y) i range(1, H + 1) range 1 H + 1 H 1 if Y[-i][j] == 0:
      now = 0
    elif now == 0:
      now = Y[-i][j]
    else:
      Y[-i][j] = now
    #print(i, now)      
#print(Y) Y[-i][j] == 0 Y[-i][j] [-i] Y -i i j 0 now = 0 now 0 elif now == 0:
      now = Y[-i][j]
     now == 0 now 0 now = Y[-i][j] now Y[-i][j] [-i] Y -i i j Y[-i][j] = now Y[-i][j] [-i] Y -i i j now ans = 0 ans 0 for i in range(H):
  for j in range(W):
    if T[i][j] != 0 and Y[i][j] != 0:
      ans = max(ans, T[i][j] + Y[i][j] - 1)
       i range(H) range H for j in range(W):
    if T[i][j] != 0 and Y[i][j] != 0:
      ans = max(ans, T[i][j] + Y[i][j] - 1)
       j range(W) range W if T[i][j] != 0 and Y[i][j] != 0:
      ans = max(ans, T[i][j] + Y[i][j] - 1)
       T[i][j] != 0 and Y[i][j] != 0 T[i][j] != 0 T[i][j] [i] T i j 0 Y[i][j] != 0 Y[i][j] [i] Y i j 0 ans = max(ans, T[i][j] + Y[i][j] - 1) ans max(ans, T[i][j] + Y[i][j] - 1) max ans T[i][j] + Y[i][j] - 1 T[i][j] + Y[i][j] T[i][j] [i] T i j Y[i][j] [i] Y i j 1 print(ans) print ans now = 0 0 now now = 0 0 now H, W = map(int, input().split()) map(int, input().split()) H ans = max(ans, T[i][j] + Y[i][j] - 1) max(ans, T[i][j] + Y[i][j] - 1) ans now = 0 0 now HW = [0] * H [0] * H HW W = map(int, input().split()) map(int, input().split()) W now = Y[-i][j] Y[-i][j] now now = 0 0 now now = 0 0 now now = 0 0 now now = T[i][-j] T[i][-j] now T = [[0] * W for i in range(H)] [[0] * W for i in range(H)] T now += 1 1 now now += 1 1 now Y = [[0] * W for i in range(H)] [[0] * W for i in range(H)] Y now = 0 0 now ans = 0 0 ans now = 0 0 now
H, W = map(int, input().split())
HW = [0] * H
for i in range(H):
  HW[i] = str(input())
  
#縦  
T = [[0] * W for i in range(H)]  
for i in range(H):#4000000
  now = 0
  for j in range(W):
    if HW[i][j] == "#":
      T[i][j] = 0
      now = 0
    else:
      now += 1
      T[i][j] = now
      
  now = 0    
  for j in range(1, W + 1):
    if T[i][-j] == 0:
      now = 0
    elif now == 0:
      now = T[i][-j]
    else:
      T[i][-j] = now
    #print(i, now)  
  
#print(T)

#横
Y = [[0] * W for i in range(H)]  
for j in range(W):#4000000
  now = 0
  for i in range(H):
    if HW[i][j] == "#":
      Y[i][j] = 0
      now = 0
    else:
      now += 1
      Y[i][j] = now
      
  now = 0    
  for i in range(1, H + 1):
    if Y[-i][j] == 0:
      now = 0
    elif now == 0:
      now = Y[-i][j]
    else:
      Y[-i][j] = now
    #print(i, now)      
#print(Y)

ans = 0
for i in range(H):
  for j in range(W):
    if T[i][j] != 0 and Y[i][j] != 0:
      ans = max(ans, T[i][j] + Y[i][j] - 1)
      
print(ans)      
    
