# frozen_string_literal: true

H,W = gets.split.map &:to_i
S = Array.new(H){gets.chomp.chars}

L = Array.new(H){Array.new(W, -1)}
R = Array.new(H){Array.new(W, -1)}
T = Array.new(H){Array.new(W, -1)}
B = Array.new(H){Array.new(W, -1)}

H.times do |i|
  sum = 0
  W.times do |j|
    if S[i][j] == "."
      sum += 1
    else
      sum = 0
    end
    L[i][j] = sum
  end
end

H.times do |i|
  sum = 0
  (W-1).downto(0) do |j|
    if S[i][j] == "."
      sum += 1
    else
      sum = 0
    end
    R[i][j] = sum
  end
end

W.times do |j|
  sum = 0
  H.times do |i|
    if S[i][j] == "."
      sum += 1
    else
      sum = 0
    end
    T[i][j] = sum
  end
end

W.times do |j|
  sum = 0
  (H-1).downto(0) do |i|
    if S[i][j] == "."
      sum += 1
    else
      sum = 0
    end
    B[i][j] = sum
  end
end

max = 0
H.times do |i|
  W.times do |j|
    num = L[i][j] + R[i][j] + T[i][j] + B[i][j] - 3
    if num > max
      max = num
    end
  end
end
p max
