#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <climits>
#include <random>
#include <iomanip>

using namespace std;
typedef long long unsigned int ll;
typedef pair<int, int> P;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

#define fillInt(xs, x)        \
  for (int i = 0; i < (x); i++) \
    scanf("%d", &xs[i]);
#define fillLong(xs, x)       \
  for (int i = 0; i < (x); i++) \
    scanf("%ld", &xs[i]);
#define fillString(xs, x)       \
  for (int i = 0; i < (x); i++) \
    cin >> xs[i];
#define sortv(xs) sort(xs.begin(), xs.end())
#define sortvdi(xs) sort(xs.begin(), xs.end(), std::greater<int>())
#define lbv(xs, x) lower_bound(xs.begin(), xs.end(), x) - xs.begin()
#define ubv(xs, x) upper_bound(xs.begin(), xs.end(), x) - xs.begin()
#define bs(xs, x) binary_search(xs.begin(), xs.end(), x)

#define rep(i,n) for(auto i=0; i<(n); i++)
#define isValidPoint(x, y, mx, my) x >= 0 && x  < mx && y >= 0 && y < my

int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

const int MOD = 1000000007;

long exp_mod(long long a, long long b, long m) {
	long long res = 1;
	while (b > 0) {
		if (b&1)
			res = (res * a)%m;
		a = (a * a)%m;
		b >>= 1;
	}
	return (long)res;
}

long fact_mod(long n, long m) {
	long long res = 1;
	for (long i=n; i>0; --i)
		res = (res * i)%m;
	return (long)res;
}

long comb_mod(long n, long r) {
	long long res = 1;
	for (long i=0; i<r; ++i)
		res = (res * (n - i) )%MOD;
	return ( res * exp_mod(fact_mod(r, MOD), MOD-2, MOD) ) % MOD;
}

long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

struct Pony
{
    long s, t, x;

    Pony(long s_, long t_, long x_)
    {
        s = s_;
        t = t_;
        x = x_;
    }

    bool operator<(const Pony &another) const
    {
        return x < another.x;
    };
};

long modinv(long a, long m) {
    long b = m, u = 1, v = 0;
    while (b) {
        long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);

  long h, w;
  cin >> h >> w;

  vector<string> s(h);
  rep(i, h) {
    cin >>s[i];
  }

  vector<vector<long>> light(h);
  rep(i, h) {
    vector<long> v(w);
    light[i] = v;
  }

  rep(i, h) {
    long j = 0;
    long start = -1;
    while (j < w) {
      while(j < w && s[i][j] == '#') {
        j++;
      }
      start = j;
      while(j < w && s[i][j] == '.') {
        j++;
      }
      long len = j-start;
      for (long jj = start; jj < j; jj++) {
        light[i][jj] += len;
      }
    }
  }

  rep(i, w) {
    long j = 0;
    long start = -1;
    while (j < h) {
      while(j < h && s[j][i] == '#') {
        j++;
      }
      start = j;
      while(j < h && s[j][i] == '.') {
        j++;
      }
      long len = j-start;
      for (long jj = start; jj < j; jj++) {
        light[jj][i] += len;
      }
    }
  }

  long res = 0;
  rep(i,h) {
    rep(j,w) {
      res = max(res, light[i][j]-1);
    }
  }

  cout << res << endl;
}


Measured memory_bytes: 37632