import std.stdio : readf, readln, writeln;
import std.string;
import std.array;
import std.conv;

void main() {
  int[] v;
  v = readln.split.to!(int[]);
  int H = v[0];
  int W = v[1];
  string[] s;
  for (int i=0; i<H; i++)
    s ~= readln.chomp;
  int[][] dw;
  int[][] dh;
  for (int i = 0; i < H; i++) {
    int[] cw;
    int count = 0;
    for (int j = 0; j < W; j++) {
      if (s[i][j] == '#') {
          cw ~= 0;
      }
      else if (j == 0 || s[i][j - 1] == '#') {
        count = 0;
        for (int k = j; k < W; k++) {
          if (s[i][k] == '.') {
            count++;
          }
          else {
            break;
          }
        }
        cw ~= count;
      }
      else {
        cw ~= count;
      }
    }
    dw ~= cw;
  }
  for (int j = 0; j < W; j++) {
    int[] ch;
    int count = 0;
    for (int i = 0; i < H; i++) {
      if (s[i][j] == '#') {
        ch ~= 0;
      }
      else if (i == 0 || s[i - 1][j] == '#') {
        count = 0;
        for (int k = i; k < H; k++) {
          if (s[k][j] == '.') {
            count++;
          }
          else {
            break;
          }
        }
        ch ~= count;
      }
      else {
        ch ~= count;
      }
    }
    dh ~= ch;
  }
  int max = 0;
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      int sum = dw[i][j] + dh[j][i];
      if (max < sum) {
        max = sum;
      }
    }
  }
  writeln(max - 1);
}
