def main():
    import sys
    input=sys.stdin.readline
    H,W=map(int,input().split())
    maze=[]
    for _ in range(H):
        s=input().rstrip()
        maze.append(s)
    lamp=[[0]*W for _ in range(H)]
    for i in range(H):
        num=0
        for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
    for i in range(W):
        num=0
        for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
    lamp=[i for j in lamp for i in j]
    print(max(lamp)-1)
    
if __name__=="__main__":
    main() def main():
    import sys
    input=sys.stdin.readline
    H,W=map(int,input().split())
    maze=[]
    for _ in range(H):
        s=input().rstrip()
        maze.append(s)
    lamp=[[0]*W for _ in range(H)]
    for i in range(H):
        num=0
        for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
    for i in range(W):
        num=0
        for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
    lamp=[i for j in lamp for i in j]
    print(max(lamp)-1)
     main import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline H,W=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W maze=[] maze [] for _ in range(H):
        s=input().rstrip()
        maze.append(s)
     _ range(H) range H s=input().rstrip() s input().rstrip() ().rstrip () input rstrip maze.append(s) maze.append maze append s [0]*W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0]*W [0] 0 W lamp=[[0]*W for _ in range(H)] lamp [[0]*W for _ in range(H)] for i in range(H):
        num=0
        for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
     i range(H) range H num=0 num 0 for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
     j range(W) range W if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
     maze[i][j]=="#" maze[i][j] [i] maze i j "#" for k in range(1,num+1):
                    lamp[i][j-k]=num
                 k range(1,num+1) range 1 num+1 num 1 lamp[i][j-k]=num lamp[i][j-k] [i] lamp i j-k j k num num=0 num 0 num+=1 num 1 if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
     j==W-1 j W-1 W 1 for k in range(num):
                        lamp[i][j-k]=num
     k range(num) range num lamp[i][j-k]=num lamp[i][j-k] [i] lamp i j-k j k num for i in range(W):
        num=0
        for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
     i range(W) range W num=0 num 0 for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
     j range(H) range H if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
     maze[j][i]=="#" maze[j][i] [j] maze j i "#" for k in range(1,num+1):
                    lamp[j-k][i]+=num
                 k range(1,num+1) range 1 num+1 num 1 lamp[j-k][i]+=num lamp[j-k][i] [j-k] lamp j-k j k i num num=0 num 0 num+=1 num 1 if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
     j==H-1 j H-1 H 1 for k in range(num):
                        lamp[j-k][i]+=num
     k range(num) range num lamp[j-k][i]+=num lamp[j-k][i] [j-k] lamp j-k j k i num i for j in lamp for i in j for j in lamp for i in j j lamp for i in j i j for i in j i lamp=[i for j in lamp for i in j] lamp [i for j in lamp for i in j] print(max(lamp)-1) print max(lamp)-1 max(lamp) max lamp 1 if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main def main():
    import sys
    input=sys.stdin.readline
    H,W=map(int,input().split())
    maze=[]
    for _ in range(H):
        s=input().rstrip()
        maze.append(s)
    lamp=[[0]*W for _ in range(H)]
    for i in range(H):
        num=0
        for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
    for i in range(W):
        num=0
        for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
    lamp=[i for j in lamp for i in j]
    print(max(lamp)-1)
     def main():
    import sys
    input=sys.stdin.readline
    H,W=map(int,input().split())
    maze=[]
    for _ in range(H):
        s=input().rstrip()
        maze.append(s)
    lamp=[[0]*W for _ in range(H)]
    for i in range(H):
        num=0
        for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
    for i in range(W):
        num=0
        for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
    lamp=[i for j in lamp for i in j]
    print(max(lamp)-1)
     main
def main():
    import sys
    input=sys.stdin.readline
    H,W=map(int,input().split())
    maze=[]
    for _ in range(H):
        s=input().rstrip()
        maze.append(s)
    lamp=[[0]*W for _ in range(H)]
    for i in range(H):
        num=0
        for j in range(W):
            if maze[i][j]=="#":
                for k in range(1,num+1):
                    lamp[i][j-k]=num
                num=0
            else:
                num+=1
                if j==W-1:
                    for k in range(num):
                        lamp[i][j-k]=num
    for i in range(W):
        num=0
        for j in range(H):
            if maze[j][i]=="#":
                for k in range(1,num+1):
                    lamp[j-k][i]+=num
                num=0
            else:
                num+=1
                if j==H-1:
                    for k in range(num):
                        lamp[j-k][i]+=num
    lamp=[i for j in lamp for i in j]
    print(max(lamp)-1)
    
if __name__=="__main__":
    main()