#include <bits/stdc++.h>

using namespace std;

#define REP1(i,n) for(int i=1, i##_len=(n); i<i##_len; ++i)
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pow(x) x*x
#define ll long long
static const ll MAX = 1000000;
static const ll INFTY = 1e12;
static const ll MOD = 1000000007;

template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };

struct edge {
    ll to, cost;
};

using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;


const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

// 深さ優先探索
vector<bool> seen;
vector<int> colors;

int H, W, N;
int sx, sy, gx, gy; 
vector<vector<char>> field;
vector<vector<int>> dist;
//vector<pair<int, int>> gx, gy;
deque<pair<int, int>> que;

typedef vector<vector<int> > Matrix;

const int INF = 100000000;


int main() {

    int H, W;
    cin >> H >> W;
    vector<string> S(H);
    REP(i, H) cin >> S[i];

    vector<vector<int>> cnt(H, vector<int>(W, 0));
    REP(i, H){
        int count = 0;
        int start = 0;
        int end = 0;
        REP(j, W){
            if(S[i][j] == '.'){
                count++;
                // cnt[i][j] = 1;
                end++;
            }else{
                // cnt[i][j] = 0;
                count = 0;
                for(int k = start; k < end; k++){
                    cnt[i][k] += end-start;
                }
                start = j+1;
                end = j+1;
            }
        }
        for(int k = start; k < end; k++){
            cnt[i][k] += end-start;
        }
    }

    
    REP(i, W){
        int count = 0;
        int start = 0;
        int end = 0;
        REP(j, H){
            if(S[j][i] == '.'){
                count++;
                // cnt[j][i] += 1;
                end++;
            }else{
                // cnt[j][i] = 0;
                count = 0;
                for(int k = start; k < end; k++){
                    cnt[k][i] += end-start;
                }
                start = j+1;
                end = j+1;
            }
        }
        for(int k = start; k < end; k++){
            cnt[k][i] += end-start;
        }
    }
    int max_ = 0;
    // REP(i, H){
    //     REP(j, W){
    //         cout << cnt[i][j] << " ";
    //         // max_ = max(max_, cnt[i][j]);
    //     }cout << endl;
    // }
    REP(i, H){
        REP(j, W){
            max_ = max(max_, cnt[i][j]);
        }
    }
    cout << max_-1 << endl;
 
  
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/


Measured memory_bytes: 20096