#include<bits/stdc++.h>
 
using namespace std;
using S = set<long long>;
using D = deque<long long>; //pop_back pop_front push_back push_front front back clear empty
using L = vector<long long>;
using M = map<int,long long>;  //erase  (でキーごと削除) 追加削除検索O(log(N))
using A = vector<vector<long long>>;
using U = unordered_map<int,long long>; //map  (との違いはkeyの順番を保持していない)
using PQL = priority_queue<long long>; //erase  (でキーごと削除) push pop top 
using PQG = priority_queue<long long,L,greater<long long>>; //erase  (でキーごと削除) push pop top 


#define sorted(vector) sort(vector.begin(),vector.end()) //O(nlongn)
#define sortedreverce(vector) sort(vector.rbegin(),vector.rend()) //O(nlongn)
#define vdel(vector,a) vector.erase(vector.begin()+a)
#define vmin(vector) *min_element(vector.begin(),vector.end()) //O(N)
#define vmax(vector) *max_element(vector.begin(),vector.end()) //O(N)
#define vsum(vector) accumulate(vector.begin(),vector.end(),0) //O(N)
#define vcount(vector,a) count(vector.begin(), vector.end(),a) //O(N)
#define vfind(vector,a) find(vector.begin(), vector.end(), a) != vector.end() //遅いからあんまり使うな
#define bisect_left(vector,a) (lower_bound(vector.begin(),vector.end(),a)-vector.begin())
#define bisect_right(vector,a) (upper_bound(vector.begin(),vector.end(),a)-vector.begin())
#define inf 1000000000000000000+10
#define setans long long ans=0;

long long ZERO=0;
long long MOD=1000000007;

template <typename PQ>
long long pqsum(PQ pq){long long tmp=0;while(!pq.empty()){tmp+=pq.top();pq.pop();};return tmp;};

template <typename T>
void print(T a){for (auto b:a){cout<<b<<" ";};cout<<endl;}
template <>
void print(unsigned long a){cout<<a<<endl;}
template <>
void print(char a){cout<<a<<endl;}
template <>
void print(bool a){cout<<a<<endl;}
template <>
void print(long long a){cout<<a<<endl;}
template <>
void print(A a){for (auto b:a){for (auto c:b){cout<<c<<" ";}cout<<endl;};cout<<endl;}
template <>
void print(string a){cout<<a<<endl;}


//存在確認はmap!!!!!!!!!!!!!か配列に埋め込んでcontinueで回避
//__gcd(a,b)はコンパイラがGCC時のみ
//printf("%.16f", ans); 誤差落ち対応君


int main(){
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    long long h,w;
    cin>>h>>w;
    A grid(h,L(w,0));
    string s;
    for(long long i=0  ;i<h  ;i++){
        cin>>s;
        for(long long j=0  ;j<w  ;j++){
            if (s[j]=='.'){
                grid[i][j]=1;
            }
        }
    }
    
    A g1=grid;
    A g2=grid;
    A g3=grid;
    A g4=grid;
    
    for(long long i=0  ;i<h  ;i++){
        for(long long j=0  ;j<w-1  ;j++){
            if (grid[i][j+1]==1){
                g1[i][j+1]+=g1[i][j];
            }
        }
        for(long long j=w-1  ;j>0  ;j--){
            if (grid[i][j-1]==1){
                g2[i][j-1]+=g2[i][j];
            }
        }
    }
    

    for(long long j=0  ;j<w  ;j++){
        for(long long i=0  ;i<h-1  ;i++){
            if (grid[i+1][j]==1){
                g3[i+1][j]+=g3[i][j];
            }
        }
        for(long long i=h-1  ;i>0  ;i--){
            if (grid[i-1][j]==1){
                g4[i-1][j]+=g4[i][j];
            }
        }
    }
    
    setans;
    for(long long i=0  ;i<h  ;i++){
        for(long long j=0  ;j<w  ;j++){
            ans=max(ans,g1[i][j]+g2[i][j]+g3[i][j]+g4[i][j]);
        }
    }
    print(ans-3);
}



Measured memory_bytes: 156928