#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Edge = pair<int, int>;
using Graph = vector<vector<Edge>>;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
const ll MOD = 1000000007;
const ll nmax = 8;
const ll INF = 1e9;
bool graph[nmax][nmax];
vector<vector<ll>> dist = vector<vector<ll>>(nmax, vector<ll>(nmax, INF));
void warshall_floyd(ll n)
{
    for (size_t i = 0; i < n; i++)
    {
        for (size_t j = 0; j < n; j++)
        {
            for (size_t k = 0; k < n; k++)
            {
                dist[j][k] = min(dist[j][k], dist[j][i] + dist[i][k]);
            }
        }
    }
}

class UnionFind
{
public:
    vector<ll> Parent;

    UnionFind(ll N)
    {
        Parent = vector<ll>(N, -1);
    }
    ll find(ll A)
    {
        if (Parent[A] < 0)
            return A;
        return Parent[A] = find(Parent[A]);
    }

    ll size(ll A)
    {
        return -Parent[find(A)];
    }

    bool Union(ll A, ll B)
    {
        A = find(A);
        B = find(B);
        if (A == B)
        {
            return false;
        }
        if (size(A) < size(B))
            swap(A, B);

        Parent[A] += Parent[B];
        Parent[B] = A;

        return true;
    }
};

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll lcm(ll a, ll b)
{
    ll g = gcd(a, b);
    return a / g * b;
}

ll mulMod(ll a, ll b)
{
    return (((a % MOD) * (b % MOD)) % MOD);
}

ll powMod(ll a, ll p)
{
    if (p == 0)
    {
        return 1;
    }
    else if (p % 2 == 0)
    {
        ll half = powMod(a, p / 2);
        return mulMod(half, half);
    }
    else
    {
        return mulMod(powMod(a, p - 1), a);
    }
}

ll ceil(ll a, ll b)
{
    return (a + b - 1) / b;
}

void solve(long long H, long long W, std::vector<std::string> S)
{
    vector<vector<ll>> dp = vector<vector<ll>>(H, vector<ll>(W, 0));

    for (int i = 0; i < H; i++)
    {
        string tmp = S[i];
        bool isContinue = true;
        ll length = 0;
        for (int j = 0; j < tmp.size(); j++)
        {
            if (tmp[j] == '#')
            {
                dp[i][j] = 0;
                isContinue = false;
                if (j > 0)
                {
                    dp[i][j - 1] = length;
                    length = 0;
                }
            }
            else
            {
                if (isContinue)
                {
                    length++;
                    dp[i][j] = length;
                }
                else
                {
                    isContinue = true;
                    length++;
                    dp[i][j] = length;
                }
            }
        }
        for (int j = tmp.size() - 1; j >= 1; j--)
        {
            if (dp[i][j] == 0)
            {
                continue;
            }
            else
            {
                if (dp[i][j - 1] != 0)
                {
                    if (dp[i][j - 1] < dp[i][j])
                    {
                        dp[i][j - 1] = dp[i][j];
                    }
                }
            }
        }
    }

    vector<vector<ll>> dp2 = vector<vector<ll>>(H, vector<ll>(W, 0));
    for (int i = 0; i < W; i++)
    {
        bool isContinue = true;
        ll length = 0;
        for (int j = 0; j < H; j++)
        {
            if (S[j][i] == '#')
            {
                dp2[j][i] = 0;
                isContinue = false;
                if (j > 0)
                {
                    dp2[j - 1][i] = length;
                    length = 0;
                }
            }
            else
            {
                if (isContinue)
                {
                    length++;
                    dp2[j][i] = length;
                }
                else
                {
                    isContinue = true;
                    length++;
                    dp2[j][i] = length;
                }
            }
        }
        for (int j = H - 1; j >= 1; j--)
        {
            if (dp2[j][i] == 0)
            {
                continue;
            }
            else
            {
                if (dp2[j - 1][i] != 0)
                {
                    if (dp2[j - 1][i] < dp2[j][i])
                    {
                        dp2[j - 1][i] = dp2[j][i];
                    }
                }
            }
        }
    }
 
    ll ans = -1;
    for (int i = 0; i < H; i++)
    {
        for (int j = 0; j < W; j++)
        {
            ans = max(ans, dp[i][j] + dp2[i][j]);
        }
    }
    cout << ans - 1 << endl;
}

int main()
{
    long long H;
    scanf("%lld", &H);
    long long W;
    scanf("%lld", &W);
    std::vector<std::string> S(H);
    for (int i = 0; i < H; i++)
    {
        std::cin >> S[i];
    }
    solve(H, W, std::move(S));
    return 0;
}


Measured memory_bytes: 67072