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