#include <bits/stdc++.h>
using namespace std;
const int MD=1e9+7;
int n,m,a[2001][2001],row[2001][2001],col[2001][2001],ans;
int main() {
    string str;
    cin>>n>>m;
    for (int i=0; i<n; i++) {
        cin>>str;
        for (int j=0; j<m; j++) a[i][j]=(str[j]=='#');
    }
    for (int i=0; i<n; i++) {
        int pre=-1,cur=0;
        while (cur<m) {
            while (cur<m and !a[i][cur]) cur++;
            for (int j=pre+1; j<cur; j++) row[i][j]=cur-pre-1;
            pre=cur; cur++;
        }
    }
    for (int j=0; j<m; j++) {
        int pre=-1,cur=0;
        while (cur<n) {
            while (cur<n and !a[cur][j]) cur++;
            for (int i=pre+1; i<cur; i++) col[i][j]=cur-pre-1;
            pre=cur; cur++;
        }
    }
    for (int i=0; i<n; i++) {
        for (int j=0; j<m; j++) {
            ans=max(ans,row[i][j]+col[i][j]-1);
        }
    }
    cout<<ans<<'\n';
}