console.log((args=>{
  const [HW,...S] = args.trim().split`\n`;
  const [H,W] = HW.split` `.map(v=>v|0);
  const map = Array.from({length:H},_=>Array(W).fill(0));
  for ( let i = 0; i < H; i++ ) {
    let w = 0;
    for ( let j = 0; j <= W; j++ ) {
      if ( j === W || S[i][j] === '#' ) {
        for ( let k = j-w; k < j; k++ ) map[i][k] += w;
        w = 0;
      } else w++;
    }
  }
  let max = 0;
  for ( let i = 0; i < W; i++ ) {
    let h = 0, hmax = 0;
    for ( let j = 0; j <= H; j++ ) {
      if ( j === H || S[j][i] === '#' ) {
        if ( max < hmax + h ) max = hmax + h;
        h = 0; hmax = 0;
      } else {
        ++h;
        if ( hmax < map[j][i] ) hmax = map[j][i]
      }
    }
  }
  return `${max-1}`;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
