#include <bits/stdc++.h>
using namespace std;

#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x,y) CPP_CAT_I(x,y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x,y) x ## y

using i8  = int8_t;
using u8  = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;

using f32 = float;
using f64 = double;

#define FOR(i, start, end) for(i64 i = (start), CPP_CAT(i,xxxx_end)=(end); i < CPP_CAT(i,xxxx_end); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) for(i64 i = 1; i <= n; ++i)
#define RREP(i, n) for(i64 i = n - 1; i >= 0 ; --i)
#define RREPS(i, n) for(i64 i = n; i >= 1; --i)

#define ALL(f,c,...) (([&](decltype((c)) cccc) { return (f)(std::begin(cccc), std::end(cccc), ## __VA_ARGS__); })(c))

#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

#define pb push_back
#define mp make_pair
#define F first
#define S second

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

template<typename C>
i64 SIZE(const C& c) { return static_cast<i64>(c.size()); }

template<typename T, size_t N>
i64 SIZE(const T (&)[N]) { return static_cast<i64>(N); }


struct ProconInit {
    static constexpr int IOS_PREC = 15;
    static constexpr bool AUTOFLUSH = false;

    ProconInit() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(IOS_PREC);
        if(AUTOFLUSH)
            cout << unitbuf;
    }
} PROCON_INIT;


#define MAX_H 2000
#define MAX_W 2000

char maze[MAX_H][MAX_W];
i64 v_table[MAX_H][MAX_W]; // 縦向きの対応表 (i, j)が(k, j)に対応する
i64 r_table[MAX_H][MAX_W]; // 横向きの対応表
i64 v_len[MAX_H][MAX_W]; // 縦向き: 障害物を含まない連続する区間の長さ
i64 r_len[MAX_H][MAX_W]; // 横向き: 障害物を含まない連続する区間の長さ

i64 H, W;

void solve() {
  i64 s; // start
  i64 len;

  // 横向きの対応表をつくる
  REP(y, H) {
    s = -1; 
    REP(x, W) {
      if (s == -1) {
        if (maze[y][x] == '#') continue;
        s = x;
        len = 1;
        r_table[y][x] = s;

        if (x == W - 1) r_len[y][s] = len;
        continue;
      }

      if (maze[y][x] == '#') {
        r_len[y][s] = len;
        s = -1;
      } else {
        len++;
        r_table[y][x] = s;

        if (x == W - 1) {
          r_len[y][s] = len;
        }
      }
    }
  }

  REP(x, W) {
    s = -1; 
    REP(y, H) {
      if (s == -1) {
        if (maze[y][x] == '#') continue;
        s = y;
        len = 1;
        v_table[y][x] = s;

        if (y == H - 1) v_len[s][x] = len;
        continue;
      }

      if (maze[y][x] == '#') {
        v_len[s][x] = len;
        s = -1;
      } else {
        len++;
        v_table[y][x] = s;

        if (y == H - 1) {
          v_len[s][x] = len;
        }
      }
    }
  }

  // REP(y, H) {
  //   REP(x, W) {
  //     cout << r_len[y][x];
  //   }
  //   cout << endl;
  // }
  // cout << endl;
  // REP(y, H) {
  //   REP(x, W) {
  //     cout << v_len[y][x];
  //   }
  //   cout << endl;
  // }

  i64 maxv = 0;
  REP(y, H) {
    REP(x, W) {
      if (maze[y][x] == '#') continue;
      i64 cnt = 0;
      cnt += r_len[y][r_table[y][x]];
      cnt += v_len[v_table[y][x]][x];
      cnt--;

      if (cnt > maxv) maxv = cnt;
    }
  }

  cout << maxv << endl;
}

int main() {
  cin >> H >> W;

  char c;
  REP(i, H * W) {
    cin >> c;
    if (c == '\n') continue;
    maze[i / W][i % W] = c;
  }

  // REP(y, H) {
  //   REP(x, W) {
  //     cout << maze[y][x];
  //   }
  //   cout << endl;
  // }

  solve();

  return 0;
}

Measured memory_bytes: 129152