#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// namespace boost::multiprecision;
// using Bint = cpp_int;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a), i##_len = (b); i < i##_len; ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define _repr(i, n) repri(i, n, 0)
#define repri(i, a, b) for(int i = int(a), i##_len = (b); i >= i##_len; --i)
/* 閉区間で定義しているので注意！repr(i,n,m)でn〜mまで */
#define repr(...) _overload3(__VA_ARGS__, repri, _repr, )(__VA_ARGS__)
/* 逆回しのループ。両閉区間であることに注意 */
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr << #x << ": " << (x) << '\n'
typedef long long lint;
// #define int lint
#define endl '\n'
const int INF = (int)1145141919;
int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const lint LINF = (lint)1e18;
typedef vector<int> vint;
typedef pair<int, int> pint;
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(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T, class U>
std::ostream &operator<<(std::ostream &os, const std::pair<T, U> p) {
    os << "(" << p.first << "," << p.second << ")";
    return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
    os << p.first << " " << p.second;
    return os;
}

template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
    is >> p.first >> p.second;
    return is;
}

template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    for(int i = 0; i < (int)v.size(); i++) {
        os << v[i] << (i + 1 != v.size() ? ", " : "");
    }
    os << "]";
    return os;
}

template <typename T> istream &operator>>(istream &is, vector<T> &v) {
    for(T &in : v)
        is >> in;
    return is;
}

template <typename T = lint> vector<T> make_v(size_t a) { return vector<T>(a); }

template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}

template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) {
    t = v;
}

template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) {
    for(auto &e : t)
        fill_v(e, v);
}

/* templates */ /* templates */ /* templates */ /* templates */ /* templates */
/* make directory: atcoder-tools gen コンテスト略称(ex.agc033) */
/* テストコード：atcoder-tools test */
/* 提出：atcoder-tools submit -u */

signed main() {
#ifdef LOCAL
    // ifstream in("in_2.txt");
    // cin.rdbuf(in.rdbuf());
#else
    cin.tie(0);
    ios::sync_with_stdio(false);
#endif

    /* input part */
    long long H;
    cin >> H;
    long long W;
    cin >> W;
    std::vector<std::string> S(H);
    for(int i = 0; i < H; i++) {
        std::cin >> S[i];
    }

    /* write your code!*/
    vector<vector<int>> yoko(H);
    vector<vector<int>> tate(W);

    // cout << S << endl;
    rep(i, H) {
        rep(j, W) {
            if(S[i][j] == '#') {
                yoko[i].emplace_back(j);
                tate[j].emplace_back(i);
            }
        }
    }

    rep(i, H) {
        yoko[i].emplace_back(W);
        yoko[i].insert(yoko[i].begin(), -1);
    }
    rep(i, W) {
        tate[i].emplace_back(H);
        tate[i].insert(tate[i].begin(), -1);
    }
    // cout << yoko << endl;
    // cout << tate << endl;
    int ans = 0;
    rep(i, H) {
        rep(j, W) {
            if(S[i][j] != '#') {
                int tmp_y = lower_bound(tate[j].begin(), tate[j].end(), i) -
                            tate[j].begin();
                int tmp = lower_bound(all(yoko[i]), j) - yoko[i].begin();
                // cerr << tmp_y << tmp << endl;
                chmax(ans, tate[j][tmp_y] - tate[j][tmp_y - 1] - 1 +
                               yoko[i][tmp] - yoko[i][tmp - 1] - 1 - 1);
            }
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 38656