#include <bits/stdc++.h>
/*
#include<algorithm>
#include<array>
#include<cassert>
#include<cmath>
#include<cstdlib>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<typeinfo>
#include<utility>
#include<vector>
*/
#define int long long int
#define double long double
using namespace std;
#define MOD 1000000007
#define INF 1000000000000000007
const int MAX_N = 1 << 17;
#define rep(i, n) for (int(i) = 0, i##_len = (n); (i) < i##_len; (i)++)
#define reps(i, x) for (int(i) = 1; (i) <= (int)(x); (i)++)
#define rrep(i, x) for (int(i) = ((int)(x)-1); (i) >= 0; (i)--)
#define rreps(i, x) for (int(i) = ((int)(x)); (i) > 0; (i)--)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define pb push_back
#define mp make_pair
#define bit(n) ((int)(1) << (n))
#define all(x) (x).begin(), (x).end()
#define debug(x) std::cout << #x << ": " << (x) << std::endl
#define nint int
using namespace std;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
typedef pair<int, int> pii;
typedef pair<double, double> dop;
template <class T>
bool chmax(T& a, const T& b)
{
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T& a, const T& b)
{
    if (b < a) {
        a = b;
        return 1;
    }
    return 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
struct aaa {
    aaa()
    {
        cin.tie(0);
        ios::sync_with_stdio(0);
        cout << fixed << setprecision(20);
    };
} aaaaaaa;


signed main()
{
    int h, w;
    cin >> h >> w;
    std::vector<std::vector<int>> grid(h, std::vector<int>(w));
    for (int i = 0; i < h; i++) {
        std::string s;
        cin >> s;
        for (int j = 0; j < s.length(); j++) {
            if (s[j] == '#') {
                grid[i][j] = 0;
            } else {
                grid[i][j] = 1;
            }
        }
    }
    std::vector<std::vector<int>> out(h, std::vector<int>(w, 0));
    std::vector<int> left(w);
    std::vector<int> right(w);
    std::vector<int> above(h);
    std::vector<int> under(h);
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            if (j == 0) {
                left[j] = grid[i][j];
                out[i][j] += left[j];
            } else {
                if (grid[i][j] == 0) {
                    left[j] = 0;
                    out[i][j] += 0;
                } else {
                    left[j] = grid[i][j] + left[j - 1];
                    out[i][j] += left[j];
                }
            }
        }
    }
    for (int i = 0; i < h; i++) {
        for (int j = w - 1; j >= 0; j--) {
            if (j == w - 1) {
                right[j] = grid[i][j];
                out[i][j] += right[j];
            } else {
                if (grid[i][j] == 0) {
                    right[j] = 0;
                    out[i][j] += 0;
                } else {
                    right[j] = grid[i][j] + right[j + 1];
                    out[i][j] += right[j];
                }
            }
        }
    }
    for (int j = 0; j < w; j++) {
        for (int i = 0; i < h; i++) {
            if (i == 0) {
                above[i] = grid[i][j];
                out[i][j] += above[i];
            } else {
                if (grid[i][j] == 0) {
                    above[i] = 0;
                    out[i][j] += 0;
                } else {
                    above[i] = grid[i][j] + above[i - 1];
                    out[i][j] += above[i];
                }
            }
        }
    }
    for (int j = 0; j < w; j++) {
        for (int i = h - 1; i >= 0; i--) {
            if (i == h - 1) {
                under[i] = grid[i][j];
                out[i][j] += under[i];
            } else {
                if (grid[i][j] == 0) {
                    under[i] = 0;
                    out[i][j] += 0;
                } else {
                    under[i] = grid[i][j] + under[i + 1];
                    out[i][j] += under[i];
                }
            }
        }
    }
    int sum = 0;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            chmax(sum, out[i][j] - 3);
        }
    }
    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 62976