import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    H, W = LI()
    S = [list(SS()) for _ in range(H)]

    left = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

    right = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

    up = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

    down = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

    ans = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

    print(max([max(i) for i in ans]))

if __name__ == '__main__':
    resolve() import bisect, collections, copy, heapq, itertools, math, string, sys bisect collections copy heapq itertools math string sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 INF = float('inf') INF float('inf') float 'inf' def I(): return int(input()) I def F(): return float(input()) F def SS(): return input() SS int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x def LI(): return [int(x) for x in input().split()] LI int(x)-1 for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x)-1 int(x) int x 1 def LI_(): return [int(x)-1 for x in input().split()] LI_ float(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() float(x) float x def LF(): return [float(x) for x in input().split()] LF def LSS(): return input().split() LSS def resolve():
    H, W = LI()
    S = [list(SS()) for _ in range(H)]

    left = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

    right = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

    up = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

    down = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

    ans = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

    print(max([max(i) for i in ans])) resolve H, W = LI() H LI() LI W list(SS()) for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) list(SS()) list SS() SS S = [list(SS()) for _ in range(H)] S [list(SS()) 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 left = [[0] * W for _ in range(H)] left [[0] * W for _ in range(H)] for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

     i range(H) range H cnt = 0 cnt 0 for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

     j range(W) range W if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

     S[i][j] == '.' S[i][j] [i] S 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 _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W right = [[0] * W for _ in range(H)] right [[0] * W for _ in range(H)] for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

     i range(H) range H cnt = 0 cnt 0 for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

     j range(W) range W if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

     S[i][W-1-j] == '.' S[i][W-1-j] [i] S i W-1-j W-1 W 1 j '.' cnt += 1 cnt 1 right[i][W-1-j] = cnt right[i][W-1-j] [i] right i W-1-j W-1 W 1 j cnt cnt = 0 cnt 0 [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W up = [[0] * W for _ in range(H)] up [[0] * W for _ in range(H)] for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

     i range(W) range W cnt = 0 cnt 0 for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

     j range(H) range H if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

     S[j][i] == '.' S[j][i] [j] S j i '.' cnt += 1 cnt 1 up[j][i] = cnt up[j][i] [j] up j i cnt cnt = 0 cnt 0 [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W down = [[0] * W for _ in range(H)] down [[0] * W for _ in range(H)] for i in range(W):
        cnt = 0
        for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

     i range(W) range W cnt = 0 cnt 0 for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

     j range(H) range H if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

     S[H-1-j][i] == '.' S[H-1-j][i] [H-1-j] S H-1-j H-1 H 1 j i '.' cnt += 1 cnt 1 down[H-1-j][i] = cnt down[H-1-j][i] [H-1-j] down H-1-j H-1 H 1 j i cnt cnt = 0 cnt 0 [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W ans = [[0] * W for _ in range(H)] ans [[0] * W for _ in range(H)] for i in range(H):
        for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

     i range(H) range H for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

     j range(W) range W ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3 ans[i][j] [i] ans i j left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3 left[i][j] + right[i][j] + up[i][j] + down[i][j] left[i][j] + right[i][j] + up[i][j] left[i][j] + right[i][j] left[i][j] [i] left i j right[i][j] [i] right i j up[i][j] [i] up i j down[i][j] [i] down i j 3 max(i) for i in ans for i in ans i ans for i in ans max(i) max i print(max([max(i) for i in ans])) print max([max(i) for i in ans]) max [max(i) for i in ans] if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve def LF(): return [float(x) for x in input().split()] def LF(): return [float(x) for x in input().split()] LF def F(): return float(input()) def F(): return float(input()) F def SS(): return input() def SS(): return input() SS def LI_(): return [int(x)-1 for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] LI_ def LI(): return [int(x) for x in input().split()] def LI(): return [int(x) for x in input().split()] LI input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def I(): return int(input()) def I(): return int(input()) I def LSS(): return input().split() def LSS(): return input().split() LSS INF = float('inf') float('inf') INF def resolve():
    H, W = LI()
    S = [list(SS()) for _ in range(H)]

    left = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

    right = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

    up = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

    down = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

    ans = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

    print(max([max(i) for i in ans])) def resolve():
    H, W = LI()
    S = [list(SS()) for _ in range(H)]

    left = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

    right = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

    up = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

    down = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

    ans = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

    print(max([max(i) for i in ans])) resolve
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    H, W = LI()
    S = [list(SS()) for _ in range(H)]

    left = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][j] == '.':
                cnt += 1
                left[i][j] = cnt
            else:
                cnt = 0

    right = [[0] * W for _ in range(H)]
    for i in range(H):
        cnt = 0
        for j in range(W):
            if S[i][W-1-j] == '.':
                cnt += 1
                right[i][W-1-j] = cnt
            else:
                cnt = 0

    up = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[j][i] == '.':
                cnt += 1
                up[j][i] = cnt
            else:
                cnt = 0

    down = [[0] * W for _ in range(H)]
    for i in range(W):
        cnt = 0
        for j in range(H):
            if S[H-1-j][i] == '.':
                cnt += 1
                down[H-1-j][i] = cnt
            else:
                cnt = 0

    ans = [[0] * W for _ in range(H)]
    for i in range(H):
        for j in range(W):
            ans[i][j] = left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3

    print(max([max(i) for i in ans]))

if __name__ == '__main__':
    resolve()
