#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.00000001
#define LONG_INF 30000000000000000LL
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define MOD 998244353
#define REP(i,n) for(long long i = 0;i < n;++i)    
#define seg_size 524288
double dot(complex<double> a, complex<double> b) {
	return a.real() * b.real() + a.imag() * b.imag();
}
double gyaku_dot(complex<double> a, complex<double> b) {
	return a.real() * b.imag() - a.imag() * b.real();
}
double leng(complex<double> a) {
	return sqrt(a.real() * a.real() + a.imag() * a.imag());
}
double angles(complex<double> a, complex<double> b) {
	double cosine = dot(a, b) / (leng(a) * leng(b));
	double sine = gyaku_dot(a, b) / (leng(a) * leng(b));
	double kaku = acos(cosine);
	if (sine <= 0) {
		kaku = 2 * Ma_PI - kaku;
	}
	return kaku;
}
vector<int> convex_hull(vector<complex<double>> a) {
	vector<int> ans;
	double now_minnest = a[0].real();
	int now_itr = 0;
	REP(i, a.size()) {
		if (now_minnest > a[i].real()) {
			now_minnest = a[i].real();
			now_itr = i;
		}
	}
	ans.push_back(now_itr);
	complex<double> ba(0, 1);
	while (true) {
		int now_go = 0;
		double now_min = 0;
		int starter = ans[ans.size() - 1];
		for (int i = 0; i < a.size(); ++i) {
			if (i != starter) {
				double goa = angles(ba, a[i] - a[starter]);
				if (goa > now_min) {
					now_min = goa;
					now_go = i;
				}
			}
		}
		if (now_go == ans[0]) break;
		ans.push_back(now_go);
		ba = complex<double>(a[now_go] - a[starter]);
	}
	return ans;
}
unsigned long xor128() {
	static unsigned long x = 123456789, y = 362436069, z = 521288629, w = 88675123;
	unsigned long t = (x ^ (x << 11));
	x = y; y = z; z = w;
	return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}
long long gcd(long long a, long long b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
int bad[3000][3000] = {};
int dp[3000][3000] = {};
int main(){
	int n, m;
	cin >> n >> m;
	REP(i, n) {
		string s;
		cin >> s;
		REP(q, m) {
			if (s[q] == '#') {
				bad[i][q] = 1;
			}
		}
		bad[i][m] = 1;
	}
	REP(i, m) {
		bad[n][i] = 1;
	}
	REP(i, n) {
		int now = 0;
		for (int q = 0; q <= m; ++q) {
			if (bad[i][q] == 1) {
				for (int j = q - 1; j >= 0; --j) {
					if (bad[i][j] == 1) {
						break;
					}
					else {
						dp[i][j] += now;
					}
				}
				now = 0;
			}
			else {
				now++;
			}
		}
	}
	REP(q, m) {
		int now = 0;
		for (int i = 0; i <= n; ++i) {
			if (bad[i][q] == 1) {
				for (int j = i - 1; j >= 0; --j) {
					if (bad[j][q] == 1) {
						break;
					}
					else {
						dp[j][q] += now;
					}
				}
				now = 0;
			}
			else {
				now++;
			}
		}
	}
	int ans = 0;
	REP(i, n) {
		REP(q, m) {
			ans = max(ans, dp[i][q]-1);
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 49408