#include<bits/stdc++.h>
using namespace std;
const int MAXN = 4000;
int n,m;
int s[MAXN][MAXN],s1[MAXN][MAXN];
int t[MAXN][MAXN],t1[MAXN][MAXN];
char str[MAXN][MAXN];
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++)
		scanf("%s",str[i]+1);
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			if(str[i][j]=='.'){
				s[i][j] = s[i][j-1]+1;
				t[i][j] = t[i-1][j]+1;
				
			}
		}
	}
	for(int i=n;i>=1;i--)
		for(int j=m;j>=1;j--){
			if(str[i][j] == '.'){
				s1[i][j] = s1[i][j+1]+1;
				t1[i][j] = t1[i+1][j]+1;//cout<<i<<" "<<j<<" "<<s1[i][j]<<" "<<t1[i][j]<<endl;
			}
		}
	int ans = 0;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			if(str[i][j] == '.')
			ans = max(ans,s[i][j] + s1[i][j] + t[i][j] + t1[i][j]-3);
		}
	}
	cout<<ans;
	
	
	
	return 0;
	
}