#include <bits/stdc++.h>

using namespace std;
inline void prep ()
{
  cin.tie (0);
  cin.sync_with_stdio (0);
};
//printf("%.12lf\n",mid);
// __builtin_popcount(int) count 1's in binary
int mod = 1000000007;

int mymod(int num){
  if (num< 0){
    if (mod == 1){
      return 0;
    }
    return mod-abs(num)%mod;
  }else{
    return num%mod;
  }
}

double eps = .0000000001;
int obstvertup[2000][2000];
int obstvertdown[2000][2000];
int obsthorleft[2000][2000];
int obsthorright[2000][2000];
bool obst[2000][2000];
int main ()
{
  prep ();
  int h, w;
  cin >> h >> w;
  
  
  for (int i=0; i<h; i++){
      string s;
      cin >> s;
      for (int j=0; j<w; j++){
          if (s[j] == '#'){
              obst[i][j] = true;
              obsthorleft[i][j] = j;
              obsthorright[i][j] = j;
              obstvertup[i][j] = i;
              obstvertdown[i][j] = i;
          }
      }
  }
  
  for (int i=0; i<h; i++){
      int last = 0;
      for (int j=0; j<w; j++){
          if (obsthorleft[i][j] != 0){
              last = obsthorleft[i][j];
          }
          obsthorleft[i][j] = last;
      }
  }
  
  for (int i=0; i<h; i++){
      int last = 0;
      for (int j=w-1; j>=0; j--){
          if (obsthorright[i][j] != 0){
              last = obsthorright[i][j];
          }
          obsthorright[i][j] = last;
      }
  }
  
  for (int i=0; i<w; i++){
      int last = 0;
      for (int j=0; j<h; j++){
          if (obstvertup[j][i] != 0){
              last = obstvertup[j][i];
          }
          obstvertup[j][i] = last;
      }
      
  }
  
  for (int i=0; i<w; i++){
      int last = 0;
      for (int j=h-1; j>=0; j--){
          if (obstvertdown[j][i] != 0){
              last = obstvertdown[j][i];
          }
          obstvertdown[j][i] = last;
      }
  }
  int maxx = 0;
  for (int i=0; i<h; i++){
      for (int j=0; j<w; j++){
          int downval = obstvertdown[i][j];
          if (downval== 0){
              downval = h;
          }
          int rightval = obsthorright[i][j];
          if (rightval == 0){
              rightval = w;
          }
          int upval = obstvertup[i][j];
          if (upval == 0 && !obst[0][j]){
              upval = -1;
          }
          int leftval = obsthorleft[i][j];
          if (leftval == 0 && !obst[i][0]){
              leftval = -1;
          }
          if (i == 1 && j == 1){
              //cout << leftval << " " << rightval << " " << upval << " " << downval << endl;
          }
          if (!obst[i][j]){
              maxx = max(maxx, downval-upval+rightval-leftval-3);
          }
      }
  }
  cout << maxx;
  
  return 0;
  
}
// in dp problems think: up until here, intervals, or "what if there's 1, 2, 3..."
// in math problems write out equations
// also in math problems to change multiplication/division to addition/subtraction use logs, add/subtract something to make the multiplication easier (like if it's 3*f(x)+2, change it to 3*(f(x)+1)-1)
// if printint pow function, put an (int) or (long long) next to it
// if checked everything check for bugs (like sorting wrong way or not putting a break in a loop)
// if n is 10^7 try brute force if the operations are simple
// if can't do dp do brute force/greedy
// to save time don't copy maps/vectors into variables if it already exists
// only use long long if need to
// if wrong on decimal problem, check if program rounds or if you can round to a certain amt of decimals
// if decimals too, if can subtract instead of divide
// in grid traversal problems check if doing sideways or not
// if TLE try to take away loop
// in recursion looking math problems look at things from the point of view of both sides (the start and the end sections of the recursion)
// think about how many possible answers there are to the problem
// try to set the answer to the problem and see if it's possible (like w/ binary search)
// if it makes it easier use +1 indexing
// think twice when writing things down that you're going to use later
// for conversions think if you can compute them w/ only one conversion 
// if the problem involves two things moving at the same time, see if you can generalise it to just one thing moving (590/B) (1117/C)
// if nt think primes
// see if you can do a pattern of steps to achieve something (1148/C) (1119/C)
// for problems where you're searching for like a pair that requires something, if it's a yes/no prob, don't focus on individual elements if it's too long (593/B)
// if sub-interval requirements, try to reduce problem into prefix array problem (pairwise numbers) (1174/D)
// think from the end of the problem (if this is the result, what is an attribute of it?)
// if repeating action, if good for debugging use function


Measured memory_bytes: 66688