from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

a = [[0 for j in range(W)] for i in range(H)]
b = [[0 for j in range(W)] for i in range(H)]

SS = []

for i in range(H):
    S = input() + "#"
    j = 0
    while j < W:
        if S[j] == "#":
            a[i][j] = 0
            j += 1
        else:
            count = 0
            k = j
            while S[k] == ".":
                count += 1
                k += 1
            for l in range(count):
                a[i][j+l] = count
            j = j + count
    SS.append(S)

SS.append("#"*(W+1))

for j in range(W):
    i = 0
    while i < H:
        if SS[i][j] == "#":
            b[i][j] = 0
            i += 1
        else:
            count = 0
            k = i
            while SS[k][j] == ".":
                count += 1
                k += 1
            for l in range(count):
                b[i+l][j] = count
            i = i + count

ans = 0
for i in range(H):
    for j in range(W):
        if ans < a[i][j] + b[i][j]:
            ans = a[i][j] + b[i][j]
print(ans-1)






 from sys import stdin import sys sys import math math from functools import reduce import functools functools import itertools itertools from collections import deque,Counter,defaultdict from operator import mul import copy copy import heapq heapq sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 INF = 10**18 INF 10**18 10 18 import bisect bisect import statistics statistics mod = 10**9+7 mod 10**9+7 10**9 10 9 7 H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W [0 for j in range(W)] for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0 for j in range(W)] a = [[0 for j in range(W)] for i in range(H)] a [[0 for j in range(W)] for i in range(H)] [0 for j in range(W)] for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0 for j in range(W)] b = [[0 for j in range(W)] for i in range(H)] b [[0 for j in range(W)] for i in range(H)] SS = [] SS [] for i in range(H):
    S = input() + "#"
    j = 0
    while j < W:
        if S[j] == "#":
            a[i][j] = 0
            j += 1
        else:
            count = 0
            k = j
            while S[k] == ".":
                count += 1
                k += 1
            for l in range(count):
                a[i][j+l] = count
            j = j + count
    SS.append(S) i range(H) range H S = input() + "#" S input() + "#" input() input "#" j = 0 j 0 while j < W:
        if S[j] == "#":
            a[i][j] = 0
            j += 1
        else:
            count = 0
            k = j
            while S[k] == ".":
                count += 1
                k += 1
            for l in range(count):
                a[i][j+l] = count
            j = j + count
     j < W j W if S[j] == "#":
            a[i][j] = 0
            j += 1
        else:
            count = 0
            k = j
            while S[k] == ".":
                count += 1
                k += 1
            for l in range(count):
                a[i][j+l] = count
            j = j + count
     S[j] == "#" S[j] S j "#" a[i][j] = 0 a[i][j] [i] a i j 0 j += 1 j 1 count = 0 count 0 k = j k j while S[k] == ".":
                count += 1
                k += 1
             S[k] == "." S[k] S k "." count += 1 count 1 k += 1 k 1 for l in range(count):
                a[i][j+l] = count
             l range(count) range count a[i][j+l] = count a[i][j+l] [i] a i j+l j l count j = j + count j j + count j count SS.append(S) SS.append SS append S SS.append("#"*(W+1)) SS.append SS append "#"*(W+1) "#" W+1 W 1 for j in range(W):
    i = 0
    while i < H:
        if SS[i][j] == "#":
            b[i][j] = 0
            i += 1
        else:
            count = 0
            k = i
            while SS[k][j] == ".":
                count += 1
                k += 1
            for l in range(count):
                b[i+l][j] = count
            i = i + count j range(W) range W i = 0 i 0 while i < H:
        if SS[i][j] == "#":
            b[i][j] = 0
            i += 1
        else:
            count = 0
            k = i
            while SS[k][j] == ".":
                count += 1
                k += 1
            for l in range(count):
                b[i+l][j] = count
            i = i + count i < H i H if SS[i][j] == "#":
            b[i][j] = 0
            i += 1
        else:
            count = 0
            k = i
            while SS[k][j] == ".":
                count += 1
                k += 1
            for l in range(count):
                b[i+l][j] = count
            i = i + count SS[i][j] == "#" SS[i][j] [i] SS i j "#" b[i][j] = 0 b[i][j] [i] b i j 0 i += 1 i 1 count = 0 count 0 k = i k i while SS[k][j] == ".":
                count += 1
                k += 1
             SS[k][j] == "." SS[k][j] [k] SS k j "." count += 1 count 1 k += 1 k 1 for l in range(count):
                b[i+l][j] = count
             l range(count) range count b[i+l][j] = count b[i+l][j] [i+l] b i+l i l j count i = i + count i i + count i count ans = 0 ans 0 for i in range(H):
    for j in range(W):
        if ans < a[i][j] + b[i][j]:
            ans = a[i][j] + b[i][j] i range(H) range H for j in range(W):
        if ans < a[i][j] + b[i][j]:
            ans = a[i][j] + b[i][j] j range(W) range W if ans < a[i][j] + b[i][j]:
            ans = a[i][j] + b[i][j] ans < a[i][j] + b[i][j] ans a[i][j] + b[i][j] a[i][j] [i] a i j b[i][j] [i] b i j ans = a[i][j] + b[i][j] ans a[i][j] + b[i][j] a[i][j] [i] a i j b[i][j] [i] b i j print(ans-1) print ans-1 ans 1 b = [[0 for j in range(W)] for i in range(H)] [[0 for j in range(W)] for i in range(H)] b j += 1 1 j k += 1 1 k H, W = map(int, input().split()) map(int, input().split()) H count += 1 1 count W = map(int, input().split()) map(int, input().split()) W ans = 0 0 ans ans = a[i][j] + b[i][j] a[i][j] + b[i][j] ans INF = 10**18 10**18 INF k = j j k k += 1 1 k j = 0 0 j SS = [] [] SS i = i + count i + count i mod = 10**9+7 10**9+7 mod a = [[0 for j in range(W)] for i in range(H)] [[0 for j in range(W)] for i in range(H)] a S = input() + "#" input() + "#" S count = 0 0 count count = 0 0 count i = 0 0 i i += 1 1 i k = i i k j = j + count j + count j count += 1 1 count
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

a = [[0 for j in range(W)] for i in range(H)]
b = [[0 for j in range(W)] for i in range(H)]

SS = []

for i in range(H):
    S = input() + "#"
    j = 0
    while j < W:
        if S[j] == "#":
            a[i][j] = 0
            j += 1
        else:
            count = 0
            k = j
            while S[k] == ".":
                count += 1
                k += 1
            for l in range(count):
                a[i][j+l] = count
            j = j + count
    SS.append(S)

SS.append("#"*(W+1))

for j in range(W):
    i = 0
    while i < H:
        if SS[i][j] == "#":
            b[i][j] = 0
            i += 1
        else:
            count = 0
            k = i
            while SS[k][j] == ".":
                count += 1
                k += 1
            for l in range(count):
                b[i+l][j] = count
            i = i + count

ans = 0
for i in range(H):
    for j in range(W):
        if ans < a[i][j] + b[i][j]:
            ans = a[i][j] + b[i][j]
print(ans-1)







