#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

#define int ll
#define all(v) v.begin(), v.end()
#define reps(__i, a, b) for (int __i = a; i < b; i++)
#define rep(__i, n) reps(__i, 0, n)

const ll INF = (1ll << 60);
const ll MOD = (ll)1e9 + 7;

signed main()
{
    int h, w;
    string s[2000];
    cin >> h >> w;
    for (int i = 0; i < h; i++)
        cin >> s[i];

    vector<vector<int>> row, cul;
    // cout << "a" << endl;
    for (int i = 0; i < h; i++)
    {
        vector<int> tmp;
        for (int j = 0; j < w; j++)
        {
            if (s[i][j] == '#')
                tmp.push_back(j);
        }
        row.push_back(tmp);
    }
    // cout << "a" << endl;
    for (int i = 0; i < w; i++)
    {
        vector<int> tmp;
        for (int j = 0; j < h; j++)
        {
            if (s[j][i] == '#')
            {
                tmp.push_back(j);
                // cout << "(" << j << "," << i << ")" << endl;
            }
        }
        cul.push_back(tmp);
    }
    // cout << "a" << endl;
    // for (int i = 0; i < w; i++)
    // {
    //     for (int j = 0; j < cul[i].size(); j++)
    //         cout << cul[i][j] << " ";
    //     cout << endl;
    // }

    int mx = -1;
    for (int i = 0; i < h; i++)
    // for (int i = 2; i < 3; i++)
    {
        for (int j = 0; j < w; j++)
        // for (int j = 0; j < 1; j++)
        {
            int tmp = 0;
            if (s[i][j] != '#')
            {
                // row
                if (row[i].size() == 0)
                    tmp += w - 1;
                else
                {
                    auto itr = upper_bound(all(row[i]), j);
                    if (itr == row[i].end())
                    {
                        // cout << "c" << endl;
                        tmp += (w - j - 1);
                    }
                    else
                    {
                        // cout << "cc" << *itr << endl;
                        tmp += (*itr - j - 1);
                    }

                    if (itr - row[i].begin() == 0)
                    {
                        // cout << "a";
                        tmp += j;
                    }
                    else
                    {

                        tmp += (j - (row[i][itr - row[i].begin() - 1]) - 1);
                    }
                }
                // cout << "=" << tmp << endl;

                // cul
                if (cul[j].size() == 0)
                    tmp += (h - 1);
                else
                {
                    auto itr = upper_bound(all(cul[j]), i);
                    if (itr == cul[j].end())
                    {
                        tmp += (h - i - 1);
                    }
                    else
                    {
                        tmp += (*itr - i - 1);
                    }

                    if (itr - cul[j].begin() == 0)
                    {
                        tmp += i;
                    }
                    else
                    {
                        tmp += (i - (cul[j][itr - cul[j].begin() - 1]) - 1);
                    }
                }
                // cout << "=" << tmp + 1 << endl;
                mx = max(mx, tmp + 1);
            }
        }
    }
    cout << mx << endl;
}

Measured memory_bytes: 67072