import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy
from operator import itemgetter

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces



H, W = na()
S = [ns() for _ in range(H)]
tmp = [[0] * W for _ in range(H)]

tmp2 = [[0] * W for _ in range(H)]
for i in range(H):
    ct = 0
    for j in range(W):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
            ct = 0
        else:
            ct += 1
    if ct != 0:
        for k in range(ct):
            tmp[i][j-k] += ct 
    

for j in range(W):
    ct = 0
    for i in range(H):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
            ct = 0
        else:
            ct += 1
    if ct != 0:
        for k in range(ct):
            tmp[i-k][j] += ct - 1

ans = -1
for i in range(H):
    for j in range(W):
        ans = max(ans, tmp[i][j])
print(ans) import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy math string itertools fractions heapq collections re array bisect sys random time copy from operator import itemgetter sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 inf = 10**20 inf 10**20 10 20 mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 stdin = sys.stdin stdin sys.stdin sys stdin ni = lambda: int(ns()) ni lambda: int(ns()) int(ns()) int ns() ns na = lambda: list(map(int, stdin.readline().split())) na lambda: list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split ns = lambda: stdin.readline().rstrip() ns lambda: stdin.readline().rstrip() stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip H, W = na() H na() na W ns() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) ns() ns S = [ns() for _ in range(H)] S [ns() for _ in range(H)] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W tmp = [[0] * W for _ in range(H)] tmp [[0] * W for _ in range(H)] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W tmp2 = [[0] * W for _ in range(H)] tmp2 [[0] * W for _ in range(H)] for i in range(H):
    ct = 0
    for j in range(W):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
            ct = 0
        else:
            ct += 1
    if ct != 0:
        for k in range(ct):
            tmp[i][j-k] += ct 
     i range(H) range H ct = 0 ct 0 for j in range(W):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
            ct = 0
        else:
            ct += 1
     j range(W) range W if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
            ct = 0
        else:
            ct += 1
     S[i][j] == '#' S[i][j] [i] S i j '#' if ct != 0:
                for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
             ct != 0 ct 0 for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
             k range(ct) range ct tmp[i][j-(k+1)] += ct tmp[i][j-(k+1)] [i] tmp i j-(k+1) j k+1 k 1 ct ct = 0 ct 0 ct += 1 ct 1 if ct != 0:
        for k in range(ct):
            tmp[i][j-k] += ct 
     ct != 0 ct 0 for k in range(ct):
            tmp[i][j-k] += ct 
     k range(ct) range ct tmp[i][j-k] += ct tmp[i][j-k] [i] tmp i j-k j k ct for j in range(W):
    ct = 0
    for i in range(H):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
            ct = 0
        else:
            ct += 1
    if ct != 0:
        for k in range(ct):
            tmp[i-k][j] += ct - 1 j range(W) range W ct = 0 ct 0 for i in range(H):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
            ct = 0
        else:
            ct += 1
     i range(H) range H if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
            ct = 0
        else:
            ct += 1
     S[i][j] == '#' S[i][j] [i] S i j '#' if ct != 0:
                for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
             ct != 0 ct 0 for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
             k range(ct) range ct tmp[i-(k+1)][j] += ct - 1 tmp[i-(k+1)][j] [i-(k+1)] tmp i-(k+1) i k+1 k 1 j ct - 1 ct 1 ct = 0 ct 0 ct += 1 ct 1 if ct != 0:
        for k in range(ct):
            tmp[i-k][j] += ct - 1 ct != 0 ct 0 for k in range(ct):
            tmp[i-k][j] += ct - 1 k range(ct) range ct tmp[i-k][j] += ct - 1 tmp[i-k][j] [i-k] tmp i-k i k j ct - 1 ct 1 ans = -1 ans -1 for i in range(H):
    for j in range(W):
        ans = max(ans, tmp[i][j]) i range(H) range H for j in range(W):
        ans = max(ans, tmp[i][j]) j range(W) range W ans = max(ans, tmp[i][j]) ans max(ans, tmp[i][j]) max ans tmp[i][j] [i] tmp i j print(ans) print ans W = na() na() W tmp2 = [[0] * W for _ in range(H)] [[0] * W for _ in range(H)] tmp2 ct += 1 1 ct stdin = sys.stdin sys.stdin stdin ni = lambda: int(ns()) lambda: int(ns()) ni inf = 10**20 10**20 inf ct += 1 1 ct H, W = na() na() H na = lambda: list(map(int, stdin.readline().split())) lambda: list(map(int, stdin.readline().split())) na ns = lambda: stdin.readline().rstrip() lambda: stdin.readline().rstrip() ns mod = 10**9 + 7 10**9 + 7 mod S = [ns() for _ in range(H)] [ns() for _ in range(H)] S tmp = [[0] * W for _ in range(H)] [[0] * W for _ in range(H)] tmp ct = 0 0 ct ct = 0 0 ct ans = max(ans, tmp[i][j]) max(ans, tmp[i][j]) ans ct = 0 0 ct ans = -1 -1 ans ct = 0 0 ct
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy
from operator import itemgetter

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces



H, W = na()
S = [ns() for _ in range(H)]
tmp = [[0] * W for _ in range(H)]

tmp2 = [[0] * W for _ in range(H)]
for i in range(H):
    ct = 0
    for j in range(W):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i][j-(k+1)] += ct 
            ct = 0
        else:
            ct += 1
    if ct != 0:
        for k in range(ct):
            tmp[i][j-k] += ct 
    

for j in range(W):
    ct = 0
    for i in range(H):
        if S[i][j] == '#':
            if ct != 0:
                for k in range(ct):
                   tmp[i-(k+1)][j] += ct - 1
            ct = 0
        else:
            ct += 1
    if ct != 0:
        for k in range(ct):
            tmp[i-k][j] += ct - 1

ans = -1
for i in range(H):
    for j in range(W):
        ans = max(ans, tmp[i][j])
print(ans)