#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <iomanip>

using namespace std;
typedef long long ll;
typedef long long int llint;
typedef pair<ll, ll> pa;
#define MM 1000000000
#define MOD MM+7
#define pi pair<int,int>
#define pl pair<ll,ll>
#define chmax(a,b) (a<b ? a=b:0)
#define chmin(a,b) (a>b ? a=b:0)
#define INF (1 << 29) //536870912

const long double PI = acos(-1);
const ll DEP = 1LL << 50;
int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};
int GCD(int x,int y){
    return y ? GCD(y,x%y) : x;
}
int H,W; char s[2002][2002];
int l[2002][2002],r[2002][2002],d[2002][2002],u[2002][2002];

void init(int H,int W){
    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            l[i][j] = 0;
            r[i][j] = 0;
            d[i][j] = 0;
            u[i][j] = 0;
        }
    }
}
int main(){
    int H,W; cin >> H >> W;
    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            cin >> s[i][j];
        }
    }
    init(H,W);
    int tmp = 0;
    //r
    for(int i = 0; i < H; i++){
        tmp = 0;
        for(int j = 0; j < W; j++){
            if(s[i][j] == '#'){
                tmp = 0;
            } else if (s[i][j] == '.'){
                tmp++;
                r[i][j] = tmp;
            }
        }
    }
    //l
    for(int i = 0; i < H; i++){
        tmp = 0;
        for(int j = W-1; j >= 0; j--){
            if(s[i][j] == '#'){
                tmp = 0;
            } else if (s[i][j] == '.'){
                tmp++;
                l[i][j] = tmp;
            }
        }
    }
    //u
    for(int i = 0; i < W; i++){
        tmp = 0;
        for(int j = 0; j < H; j++){
            if(s[j][i] == '#'){
                tmp = 0;
            } else if (s[j][i] == '.'){
                tmp++;
                u[j][i] = tmp;
            }
        }
    }
    //d
    for(int i = 0; i < W; i++){
        tmp = 0;
        for(int j = H-1; j >= 0; j--){
            if(s[j][i] == '#'){
                tmp = 0;
            } else if (s[j][i] == '.'){
                tmp++;
                d[j][i] = tmp;
            }
        }
    }
    /*
    cout << 'd' << endl;

    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            cout << d[i][j] << " ";
        }
        cout << endl;
    }
    cout << 'u' << endl;

    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            cout << u[i][j] << " ";
        }
        cout << endl;
    }
    */
    int mx = 0;
    int cnt = 0;
    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            int check = u[i][j] + d[i][j] + r[i][j] + l[i][j] - 3;

            //cout << check << endl;
            /*
            if(mx < check){
                //cout << "i=" << i << ", j=" << j << ", check=" << check << ", ";
                //cout << "u[i][j]=" << u[i][j] << ", d[i][j]=" << d[i][j] << ", r[i][j]=" << r[i][j] << ", l[i][j]=" << u[i][j] << endl;
            }
            */
            mx = max(mx,check);
            
        }
    }
    //cout << endl;
    //cout << "cnt=" << cnt << endl;
    cout << mx << endl;
}




Measured memory_bytes: 66816