(h,w)=gets.split.map(&:to_i)
dat=ARGF.map {|s|s.chars.map{|c| c == "#" }}
 
h_dat=[[]]
(0...h).each{|i| h_dat[i]=[0]*w }
 
(0...h).each{|i|
    list =(0...w).each_with_object([]){|x,c| c << x if dat[i][x] }
    [-1,*list,w].each_cons(2){|l,r|
        (l+1...r).each{|x|
            h_dat[i][x]= r- l -1
        }
    }
}
 
w_dat=[[]]
(0...h).each{|i| w_dat[i]=[0]*w }
 
(0...w).each{|i|
    list =(0...h).each_with_object([]){|x,c| c << x if dat[x][i] }
    [-1,*list,h].each_cons(2){|l,r|
        (l+1...r).each{|x|
            w_dat[x][i]= r- l -1
        }
    }
}
 
x = (0...h).each_with_object([]){|i,c|
    (0...w).each{|k|
            c << h_dat[i][k] + w_dat[i][k]
        }
    }.max
#x = (0...h).to_a.product((0...w).to_a).map {|i,k| h_dat[i][k] + w_dat[i][k] }.max
 
p x - 1