H,W = gets.split().map(&:to_i)
a = [0] * (W+1)
r = 0
H.times do |i|
	a = a.map{|b| b+1}
	a[W] = 0
	gets.split().each.with_index(0) do |c, i|
		a[i] = 0 if c.to_i != 0
	end
	W.times do |i|
		next if a[i] <= a[i+1]
		ma = a[i]
		i.downto(0) do |j|
			ma = a[j] if a[j] < ma
			next if j>0 && ma <= a[j-1]
			break if ma == 0
			d = (i-j+1) * ma
			r = d if d > r
		end
	end
end
p r