#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
using namespace std;

#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v.begin(), v.end())
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }

typedef long long  ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
ll L[2010][2010],R[2020][2020],U[2020][2020],D[2020][2020];

int main()
{

    int h, w;
    string grid[2010];
    cin >> h >> w;
    REP(i, h)
    cin >> grid[i];
  //横から
    for (int i = 0; i < h; i++)
    {
        L[i][0] = -1;
        for (int j = 1; j < w; j++)
        {
            if(grid[i][j-1]=='#'){
                L[i][j] = j - 1;
            }
            else L[i][j] = L[i][j - 1];

        }
    }
    
   for (int i = 0; i < h; i++)
   {
       R[i][w - 1] = w;
       for (int j = w - 2; j >= 0; j--)
       {
           if(grid[i][j+1]=='#'){
               R[i][j] = j + 1;
           }
           else{
               R[i][j] = R[i][j + 1];
           }
       }
       
   }

    for (int j = 0; j < w; j++)
    {
        D[0][j] = -1;
        for (int i = 1; i < h; i++)
        {
            if(grid[i-1][j]=='#'){
                D[i][j] = i - 1;
            }
            else D[i][j] = D[i-1][j];

        }
    }
    
   for (int j = 0; j < w; j++)
   {
       U[h-1][j] = h;
       for (int i = h - 2; i >= 0; i--)
       {
           if(grid[i+1][j]=='#'){
               U[i][j] = i + 1;
           }
           else{
               U[i][j] = U[i+1][j];
           }
       }
       
   }
   ll res = 0;
   ll ans = 0;
   for (int i = 0; i < h; i++)
   {
       for (int j = 0; j < w; j++)
       {   res=0;
            if(grid[i][j]=='#')
               continue;
           res += j - L[i][j];
           res += R[i][j] - j;
           res += i - D[i][j];
           res += U[i][j] - i;
           ans = max(ans, res);
       }
   }
   cout << ans-3 << endl;

   return 0;
}


Measured memory_bytes: 133248