#include <bits/stdc++.h>

using namespace std;

int main() {
    int H, W;
    cin >> H >> W;
    vector<string> S(H);
    for_each(begin(S), end(S), [](string &str) { cin >> str; });

    vector<vector<int>> sum_h(H, vector<int>(W + 1)), sum_w(H + 1, vector<int>(W));
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            sum_h[i][j + 1] += sum_h[i][j] + (S[i][j] == '#');
        }
    }
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            sum_h[i][j] = sum_h[i][j + 1];
        }
    }
    for (int j = 0; j < W; j++) {
        for (int i = 0; i < H; i++) {
            sum_w[i + 1][j] += sum_w[i][j] + (S[i][j] == '#');
        }
    }
    for (int j = 0; j < W; j++) {
        for (int i = 0; i < H; i++) {
            sum_w[i][j] = sum_w[i + 1][j];
        }
    }

    //int cnt = 0;
    int ans = 0;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if (S[i][j] == '#') continue;

            int top = 0;
            if (i > 0) {
                if (sum_w[i][j] == sum_w[0][j]) {
                    top = i;
                } else {
                    int ng = 0, ok = i;
                    while (ok - ng > 1) {
                        const int mid = (ok + ng) / 2;
                        if (sum_w[i][j] == sum_w[mid][j]) {
                            ok = mid;
                        } else {
                            ng = mid;
                        }
                    }
                    top = i - ok - 1;
                }
            }
            int left = 0;
            if (j > 0) {
                if (sum_h[i][j] == sum_h[i][0]) {
                    left = j;
                } else {
                    int ng = 0, ok = j;
                    while (ok - ng > 1) {
                        const int mid = (ok + ng) / 2;
                        if (sum_h[i][j] == sum_h[i][mid]) {
                            ok = mid;
                        } else {
                            ng = mid;
                        }
                    }
                    left = j - ok - 1;
                }
            }
            int down = 0;
            if (i + 1 < H) {
                if (sum_w[i][j] == sum_w[H - 1][j]) {
                    down = H - 1 - i;
                } else {
                    int ng = H - 1, ok = i;
                    while (ng - ok > 1) {
                        const int mid = (ng + ok) / 2;
                        if (sum_w[i][j] == sum_w[mid][j]) {
                            ok = mid;
                        } else {
                            ng = mid;
                        }
                    }
                    down = ok - i;
                }
            }
            int right = 0;
            if (j + 1 < W) {
                if (sum_h[i][j] == sum_h[i][W - 1]) {
                    right = W - 1 - j;
                } else {
                    int ng = W - 1, ok = j;
                    while (ng - ok > 1) {
                        const int mid = (ng + ok) / 2;
                        if (sum_h[i][j] == sum_h[i][mid]) {
                            ok = mid;
                        } else {
                            ng = mid;
                        }
                    }
                    right = ok - j;
                }
            }

            //cerr  << ++cnt << " " << top << " " << left << " " << down << " " << right << endl;

            const int cur = top + left + down + right + 1;
            ans = max(ans, cur);
        }
    }

    cout << ans << endl;
}


Measured memory_bytes: 35840