#!/usr/bin/env python3
import numpy as np

h, w = list(map(int, input().split()))

s = np.array([list(input()) for _ in range(h)]) == "."

ups = np.zeros((h, w), dtype=int)
downs = np.zeros((h, w), dtype=int)
rights = np.zeros((h, w), dtype=int)
lefts = np.zeros((h, w), dtype=int)

for i in range(1, h):
    ups[i, :] = (ups[i-1]+1)*s[i-1]

for i in reversed(range(h-1)):
    downs[i, :] = (downs[i+1]+1)*s[i+1]

for i in range(1, w):
    rights[:, i] = (rights[:, i-1]+1)*s[:, i-1]

for i in reversed(range(w-1)):
    lefts[:, i] = (lefts[:, i+1]+1)*s[:, i+1]

ans = (((ups+downs+lefts+rights)*s).max()+1)
print(ans)


# data_w = []
# data_w_index = []
# data_h = []
# data_h_index = []

# for i in range(h):
#     count = 0
#     index = 0
#     data_w_index_tmp = []
#     data_w_tmp = []
#     for j in range(len(s[i])):
#         # print(s[i][j][0])
#         # print(count)
#         # print(index)
#         if s[i][j] == ".":
#             count += 1
#             data_w_index_tmp.append(index)
#         else:
#             data_w_tmp.append(count)
#             data_w_index_tmp.append(-1)
#             count = 0
#             index += 1
#     data_w_tmp.append(count)
#     # data_w_index_tmp.append(index)

#     data_w_index.append(data_w_index_tmp)
#     data_w.append(data_w_tmp)

# print(data_w)
# print(data_w_index)

# for i in range(w):
#     count = 0
#     index = 0
#     data_h_index_tmp = []
#     data_h_tmp = []
#     for j in range(len(s)):
#         # print(s[i][j][0])
#         # print(count)
#         # print(index)
#         if s[j][i] == ".":
#             count += 1
#             data_h_index_tmp.append(index)
#         else:
#             data_h_tmp.append(count)
#             data_h_index_tmp.append(-1)
#             count = 0
#             index += 1
#     data_h_tmp.append(count)
#     # data_h_index_tmp.append(index)

#     data_h_index.append(data_h_index_tmp)
#     data_h.append(data_h_tmp)

# # print(data_h)
# # print(data_h_index)

# ans = 0
# for i in range(w):
#     for j in range(h):
#         index_h = data_h_index[i][j]
#         index_w = data_w_index[j][i]
#         if index_h != 1:
#             ans_tmp = data_h[i][index_h]+data_w[j][index_w]-1
#             ans = max(ans, ans_tmp)
# print(ans) import numpy as np numpy h, w = list(map(int, input().split())) h list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split w list(input()) for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) list(input()) list input() input s = np.array([list(input()) for _ in range(h)]) == "." s np.array([list(input()) for _ in range(h)]) == "." np.array([list(input()) for _ in range(h)]) np.array np array [list(input()) for _ in range(h)] "." ups = np.zeros((h, w), dtype=int) ups np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int downs = np.zeros((h, w), dtype=int) downs np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int rights = np.zeros((h, w), dtype=int) rights np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int lefts = np.zeros((h, w), dtype=int) lefts np.zeros((h, w), dtype=int) np.zeros np zeros (h, w) h w dtype=int dtype int for i in range(1, h):
    ups[i, :] = (ups[i-1]+1)*s[i-1] i range(1, h) range 1 h ups[i, :] = (ups[i-1]+1)*s[i-1] ups[i, :] ups i (ups[i-1]+1)*s[i-1] ups[i-1]+1 ups[i-1] ups i-1 i 1 1 s[i-1] s i-1 i 1 for i in reversed(range(h-1)):
    downs[i, :] = (downs[i+1]+1)*s[i+1] i reversed(range(h-1)) reversed range(h-1) range h-1 h 1 downs[i, :] = (downs[i+1]+1)*s[i+1] downs[i, :] downs i (downs[i+1]+1)*s[i+1] downs[i+1]+1 downs[i+1] downs i+1 i 1 1 s[i+1] s i+1 i 1 for i in range(1, w):
    rights[:, i] = (rights[:, i-1]+1)*s[:, i-1] i range(1, w) range 1 w rights[:, i] = (rights[:, i-1]+1)*s[:, i-1] rights[:, i] rights : (rights[:, i-1]+1)*s[:, i-1] rights[:, i-1]+1 rights[:, i-1] rights : 1 s[:, i-1] s : for i in reversed(range(w-1)):
    lefts[:, i] = (lefts[:, i+1]+1)*s[:, i+1] i reversed(range(w-1)) reversed range(w-1) range w-1 w 1 lefts[:, i] = (lefts[:, i+1]+1)*s[:, i+1] lefts[:, i] lefts : (lefts[:, i+1]+1)*s[:, i+1] lefts[:, i+1]+1 lefts[:, i+1] lefts : 1 s[:, i+1] s : ans = (((ups+downs+lefts+rights)*s).max()+1) ans ((ups+downs+lefts+rights)*s).max()+1 ((ups+downs+lefts+rights)*s).max() (ups+downs+lefts+rights)*s).max (ups+downs+lefts+rights)*s ups+downs+lefts+rights ups+downs+lefts ups+downs ups downs lefts rights s max 1 print(ans) print ans s = np.array([list(input()) for _ in range(h)]) == "." np.array([list(input()) for _ in range(h)]) == "." s ans = (((ups+downs+lefts+rights)*s).max()+1) ((ups+downs+lefts+rights)*s).max()+1 ans downs = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) downs w = list(map(int, input().split())) list(map(int, input().split())) w lefts = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) lefts ups = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) ups h, w = list(map(int, input().split())) list(map(int, input().split())) h rights = np.zeros((h, w), dtype=int) np.zeros((h, w), dtype=int) rights
#!/usr/bin/env python3
import numpy as np

h, w = list(map(int, input().split()))

s = np.array([list(input()) for _ in range(h)]) == "."

ups = np.zeros((h, w), dtype=int)
downs = np.zeros((h, w), dtype=int)
rights = np.zeros((h, w), dtype=int)
lefts = np.zeros((h, w), dtype=int)

for i in range(1, h):
    ups[i, :] = (ups[i-1]+1)*s[i-1]

for i in reversed(range(h-1)):
    downs[i, :] = (downs[i+1]+1)*s[i+1]

for i in range(1, w):
    rights[:, i] = (rights[:, i-1]+1)*s[:, i-1]

for i in reversed(range(w-1)):
    lefts[:, i] = (lefts[:, i+1]+1)*s[:, i+1]

ans = (((ups+downs+lefts+rights)*s).max()+1)
print(ans)


# data_w = []
# data_w_index = []
# data_h = []
# data_h_index = []

# for i in range(h):
#     count = 0
#     index = 0
#     data_w_index_tmp = []
#     data_w_tmp = []
#     for j in range(len(s[i])):
#         # print(s[i][j][0])
#         # print(count)
#         # print(index)
#         if s[i][j] == ".":
#             count += 1
#             data_w_index_tmp.append(index)
#         else:
#             data_w_tmp.append(count)
#             data_w_index_tmp.append(-1)
#             count = 0
#             index += 1
#     data_w_tmp.append(count)
#     # data_w_index_tmp.append(index)

#     data_w_index.append(data_w_index_tmp)
#     data_w.append(data_w_tmp)

# print(data_w)
# print(data_w_index)

# for i in range(w):
#     count = 0
#     index = 0
#     data_h_index_tmp = []
#     data_h_tmp = []
#     for j in range(len(s)):
#         # print(s[i][j][0])
#         # print(count)
#         # print(index)
#         if s[j][i] == ".":
#             count += 1
#             data_h_index_tmp.append(index)
#         else:
#             data_h_tmp.append(count)
#             data_h_index_tmp.append(-1)
#             count = 0
#             index += 1
#     data_h_tmp.append(count)
#     # data_h_index_tmp.append(index)

#     data_h_index.append(data_h_index_tmp)
#     data_h.append(data_h_tmp)

# # print(data_h)
# # print(data_h_index)

# ans = 0
# for i in range(w):
#     for j in range(h):
#         index_h = data_h_index[i][j]
#         index_w = data_w_index[j][i]
#         if index_h != 1:
#             ans_tmp = data_h[i][index_h]+data_w[j][index_w]-1
#             ans = max(ans, ans_tmp)
# print(ans)
