let h, w = Scanf.scanf " %d %d" @@ fun a b -> a, b
let ss = Array.init h @@ fun _ -> Scanf.scanf " %s" @@ fun s -> s
let ys = Array.make_matrix h w 0
let xs = Array.make_matrix h w 0
let ans = ref 0
let _ =
  let c = ref 0 in
  for y = 0 to h - 1 do
    for x = 0 to w - 1 do
      if ss.(y).[x] = '#' then
        (for i = 1 to !c - 1 do
          xs.(y).(x - i) <- !c
        done;
        c := 0; xs.(y).(x) <- 0)
      else
        (incr c; xs.(y).(x) <- !c)
    done
  done;
  for x = 0 to w - 1 do
    for y = 0 to h - 1 do
      if ss.(y).[x] = '#' then
        (for i = 1 to !c - 1 do
          xs.(y - i).(x) <- !c
        done;
        c := 0; xs.(y).(x) <- 0)
      else
        (incr c; xs.(y).(x) <- !c)
    done
  done;
  for y = 0 to h - 1 do
    for x = 0 to w - 1 do
      if ss.(y).[x] <> '#' then
        ans := max !ans @@ ys.(y).(x) + xs.(y).(x)
    done
  done;
  Printf.printf "%d\n" !ans