import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

tile = [0 for i in range(H)]
cnt = [[0 for _ in range(W)] for _ in range(H)]

for i in range(H):
    tile[i] = readline().decode().strip()

for i in range(H):
    done = [False for _ in range(W)]
    for j in range(W):
        if tile[i][j] == '#':
            continue
        if done[j]:
            continue
        l = 0
        while (j + l < W):
            if tile[i][j + l] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i][j + k] += l
            done[j + k] = True

for j in range(W):
    done = [False for _ in range(H)]
    for i in range(H):
        if tile[i][j] == '#':
            continue
        if done[i]:
            continue
        l = 0
        while (i + l < H):
            if tile[i + l][j] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i + k][j] += l
            done[i + k] = True

ans = 0
for i in range(H):
    for j in range(W):
        ans = max(cnt[i][j] - 1, ans)
print(ans)
 import sys sys import itertools itertools import time time import math math sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 from collections import defaultdict read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines H, W = map(int, readline().split()) H map(int, readline().split()) map int readline().split() ().split () readline split W 0 for i in range(H) for i in range(H) i range(H) range H for i in range(H) 0 tile = [0 for i in range(H)] tile [0 for i in range(H)] [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] cnt = [[0 for _ in range(W)] for _ in range(H)] cnt [[0 for _ in range(W)] for _ in range(H)] for i in range(H):
    tile[i] = readline().decode().strip() i range(H) range H tile[i] = readline().decode().strip() tile[i] tile i readline().decode().strip() ().decode().strip ().decode() ().decode () readline decode strip for i in range(H):
    done = [False for _ in range(W)]
    for j in range(W):
        if tile[i][j] == '#':
            continue
        if done[j]:
            continue
        l = 0
        while (j + l < W):
            if tile[i][j + l] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i][j + k] += l
            done[j + k] = True i range(H) range H False for _ in range(W) for _ in range(W) _ range(W) range W for _ in range(W) False done = [False for _ in range(W)] done [False for _ in range(W)] for j in range(W):
        if tile[i][j] == '#':
            continue
        if done[j]:
            continue
        l = 0
        while (j + l < W):
            if tile[i][j + l] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i][j + k] += l
            done[j + k] = True j range(W) range W if tile[i][j] == '#':
            continue
         tile[i][j] == '#' tile[i][j] [i] tile i j '#' continue if done[j]:
            continue
         done[j] done j continue l = 0 l 0 while (j + l < W):
            if tile[i][j + l] == '#':
                break
            l += 1
         j + l < W j + l j l W if tile[i][j + l] == '#':
                break
             tile[i][j + l] == '#' tile[i][j + l] [i] tile i j + l j l '#' break l += 1 l 1 for k in range(l):
            cnt[i][j + k] += l
            done[j + k] = True k range(l) range l cnt[i][j + k] += l cnt[i][j + k] [i] cnt i j + k j k l done[j + k] = True done[j + k] done j + k j k True for j in range(W):
    done = [False for _ in range(H)]
    for i in range(H):
        if tile[i][j] == '#':
            continue
        if done[i]:
            continue
        l = 0
        while (i + l < H):
            if tile[i + l][j] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i + k][j] += l
            done[i + k] = True j range(W) range W False for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) False done = [False for _ in range(H)] done [False for _ in range(H)] for i in range(H):
        if tile[i][j] == '#':
            continue
        if done[i]:
            continue
        l = 0
        while (i + l < H):
            if tile[i + l][j] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i + k][j] += l
            done[i + k] = True i range(H) range H if tile[i][j] == '#':
            continue
         tile[i][j] == '#' tile[i][j] [i] tile i j '#' continue if done[i]:
            continue
         done[i] done i continue l = 0 l 0 while (i + l < H):
            if tile[i + l][j] == '#':
                break
            l += 1
         i + l < H i + l i l H if tile[i + l][j] == '#':
                break
             tile[i + l][j] == '#' tile[i + l][j] [i + l] tile i + l i l j '#' break l += 1 l 1 for k in range(l):
            cnt[i + k][j] += l
            done[i + k] = True k range(l) range l cnt[i + k][j] += l cnt[i + k][j] [i + k] cnt i + k i k j l done[i + k] = True done[i + k] done i + k i k True ans = 0 ans 0 for i in range(H):
    for j in range(W):
        ans = max(cnt[i][j] - 1, ans) i range(H) range H for j in range(W):
        ans = max(cnt[i][j] - 1, ans) j range(W) range W ans = max(cnt[i][j] - 1, ans) ans max(cnt[i][j] - 1, ans) max cnt[i][j] - 1 cnt[i][j] [i] cnt i j 1 ans print(ans) print ans tile = [0 for i in range(H)] [0 for i in range(H)] tile readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines ans = 0 0 ans l = 0 0 l readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline cnt = [[0 for _ in range(W)] for _ in range(H)] [[0 for _ in range(W)] for _ in range(H)] cnt ans = max(cnt[i][j] - 1, ans) max(cnt[i][j] - 1, ans) ans done = [False for _ in range(W)] [False for _ in range(W)] done done = [False for _ in range(H)] [False for _ in range(H)] done H, W = map(int, readline().split()) map(int, readline().split()) H l += 1 1 l l += 1 1 l l = 0 0 l W = map(int, readline().split()) map(int, readline().split()) W read = sys.stdin.buffer.read sys.stdin.buffer.read read
import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

tile = [0 for i in range(H)]
cnt = [[0 for _ in range(W)] for _ in range(H)]

for i in range(H):
    tile[i] = readline().decode().strip()

for i in range(H):
    done = [False for _ in range(W)]
    for j in range(W):
        if tile[i][j] == '#':
            continue
        if done[j]:
            continue
        l = 0
        while (j + l < W):
            if tile[i][j + l] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i][j + k] += l
            done[j + k] = True

for j in range(W):
    done = [False for _ in range(H)]
    for i in range(H):
        if tile[i][j] == '#':
            continue
        if done[i]:
            continue
        l = 0
        while (i + l < H):
            if tile[i + l][j] == '#':
                break
            l += 1
        for k in range(l):
            cnt[i + k][j] += l
            done[i + k] = True

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

