"use strict";

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }

function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); }

function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

!function () {
  function splitNum(line) {
    return (Array.isArray(line) ? line : line.split(/\s+/)).map(function (n) {
      return parseInt(n);
    });
  }

  function makeArr(size, defaultValue) {
    if (!Array.isArray(size)) size = [size];
    if (1 === size.length) return new Array(size[0]).fill(defaultValue);

    var _size = size,
        _size2 = _toArray(_size),
        here = _size2[0],
        rest = _size2.slice(1);

    return new Array(here).fill(null).map(function () {
      return makeArr(rest, defaultValue);
    });
  }

  !function (input) {
    var lines = input.split("\n");

    var _splitNum = splitNum(lines[0]),
        _splitNum2 = _slicedToArray(_splitNum, 2),
        H = _splitNum2[0],
        W = _splitNum2[1];

    var S = lines.slice(1, H + 1);
    var ws = makeArr([H, W], 0);
    var hs = makeArr([H, W], 0);

    for (var h = 0; h < H; h++) {
      var cur = 0;

      for (var w = 0; w < W; w++) {
        if ("#" === S[h][w]) {
          ws[h][w] = -1;
          cur = 0;
        } else {
          cur++;
          ws[h][w] = cur;
        }
      }

      cur = -1;

      for (var _w = W - 1; _w >= 0; _w--) {
        if (-1 !== ws[h][_w]) {
          if (-1 === cur) cur = ws[h][_w];else ws[h][_w] = cur;
        } else cur = -1;
      }
    }

    for (var _w2 = 0; _w2 < W; _w2++) {
      var _cur = 0;

      for (var _h = 0; _h < H; _h++) {
        if ("#" === S[_h][_w2]) {
          hs[_h][_w2] = -1;
          _cur = 0;
        } else {
          _cur++;
          hs[_h][_w2] = _cur;
        }
      }

      _cur = -1;

      for (var _h2 = H - 1; _h2 >= 0; _h2--) {
        if (-1 !== hs[_h2][_w2]) {
          if (-1 === _cur) _cur = hs[_h2][_w2];else hs[_h2][_w2] = _cur;
        } else _cur = -1;
      }
    }

    var max = 0;

    for (var _h3 = 0; _h3 < H; _h3++) {
      for (var _w3 = 0; _w3 < W; _w3++) {
        var val = ws[_h3][_w3] + hs[_h3][_w3] - 1;
        if (val > max) max = val;
      }
    }

    console.log(max);
  }(require("fs").readFileSync("/dev/stdin", "utf8"));
}();
