H, W = gets.chomp.split(" ").map(&:to_i)
S = []
H.times{
  S << gets.chomp.unpack('C*')
}

Lamp = []
H.times{
  Lamp << Array.new(W, 0)
}
S.each_with_index{|row, yidx|
  cnt = 0
  row.each_with_index{|s, x|
    if s == 35 then    # '#'.ord => 35
      cnt.times{|t| Lamp[yidx][x-1-t] = cnt}
      cnt = 0
    else
      cnt += 1
    end
  }
  cnt.times{|t| Lamp[yidx][W-1-t] = cnt}
}

ans = 0
(0...W).each{|x|
  cnt = 0
  (0...H).each{|y|
    if S[y][x] == 35 then  # '#'.ord => 35
      cnt.times{|t|
        tmp = Lamp[y-t-1][x] + cnt
        ans = tmp if ans < tmp
      }
      cnt = 0
    else
      cnt += 1
    end
  }
  cnt.times{|t|
    tmp = Lamp[H-1-t][x] + cnt
    ans = tmp if ans < tmp
  }
}

puts ans - 1
