#include<bits/stdc++.h>
using namespace std;
int main(){
    int h,w;
    cin>>h>>w;
    vector<vector<char>>s(h,vector<char>(w));
    vector<vector<int>>yoko(h,vector<int>(1));
    vector<vector<int>>tate(w,vector<int>(1));
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>s[i][j];
            if(s[i][j]=='#'){
                yoko[i].push_back(j+1);
                tate[j].push_back(i+1);
            }
        }
        yoko[i].push_back(w+1);
    }
    for(int i=0;i<w;i++)tate[i].push_back(h+1);
    int x=0;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(s[i][j]=='#')continue;
            int a=upper_bound(yoko[i].begin(),yoko[i].end(),j)-yoko[i].begin();
            int b=upper_bound(tate[j].begin(),tate[j].end(),i)-tate[j].begin();
            x=max(x,yoko[i][a]-yoko[i][a-1]+tate[j][b]-tate[j][b-1]-3);
        }
    }
    cout<<x<<endl;
    return 0;
}