input1 = gets.chomp
h,w = input1.split.collect{ |item| item.to_i}
slist = []
hlight = []
wlight = []
light_point = []
max = h+w-1
check_list = []
slist_h = []
w.times do |wi|
  slist_h[wi] = ""
end
h.times do |i|
  slist[i] =  gets.chomp
  count = 0
  slist[i].each_char do |o|
    if o == "."
      check_list.push([i,count])
    end
    slist_h[count] += o
    count += 1
  end
end

def calc_list(list)
  result = []
  list.each do |line|
    result.push(calc_line(line))
  end
  return result
end


def calc_line(line)
  result = []
  light = 0
  left = 0
  count = 0
  line.each_char do |one|
      if one == "#"
        left.upto(count){ |i| result[i] = light}
        result[count] = 0
        light = 0
        left = count+1
      else
        light += 1
      end
    count += 1
  end
  left.upto(count){ |i| result[i] = light}
  return result
end


wlist = calc_list(slist)
hlist = calc_list(slist_h)

max = 0
check_list.each do |one|
  one
  max_now = wlist[one[0]][one[1]] + hlist[one[1]][one[0]] -1
  max = max_now if max < max_now
end
puts max

