class Yukicoder def initialize @r, @c = gets.chomp.split.map(&:to_i) end def run k = (@r >> 1) * (@c >> 1) # 一辺が奇数の正方形 k <<= 1 if @r != @c # 一辺が奇数の正方形と長方形 k += @c >> 1 if @r.odd? # 2辺共奇数の長方形 k += @r >> 1 if @c.odd? && @r != @c # 2辺共偶数の四角形 k += 1 if @r.odd? && @c.odd? return k - 1 end end puts Yukicoder.new.run