import std.algorithm;
import std.container;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;


struct Point {
  int x;
  int y;
}


void main() {
  auto hw = readln.chomp.split.to!(int[]);
  int h = hw[0];
  int w = hw[1];

  bool[][] is_wall;
  iota(h).each!(_ => is_wall ~= readln.chomp.map!(c => c == '#').array ~ [true]);
  is_wall ~= true.repeat.take(w + 1).array;

  auto buf = make!(SList!Point);
  int sight;

  int[Point] x_sight;
  foreach (y; iota(h + 1)) {
    sight = 0;
    buf.clear;
    foreach (x; iota(w + 1)) {
      if (is_wall[y][x]) {
        foreach (i; buf) x_sight[i] = sight;
        x_sight[Point(x, y)] = 0;
        sight = 0;
        buf.clear;
      } else {
        buf.insert(Point(x, y));
        sight++;
      }
    }
  }

  int[Point] y_sight;
  foreach (x; iota(w + 1)) {
    sight = 0;
    buf.clear;
    foreach (y; iota(h + 1)) {
      if (is_wall[y][x]) {
        foreach (i; buf) y_sight[i] = sight;
        y_sight[Point(x, y)] = 0;
        sight = 0;
        buf.clear;
      } else {
        buf.insert(Point(x, y));
        sight++;
      }
    }
  }

  int ans;
  foreach (x; iota(w)) foreach (y; iota(h)) {
    ans = ans.max(x_sight[Point(x, y)] + y_sight[Point(x, y)] - 1);
  }

  writeln(ans);
}
