R,C = gets.split.map(&:to_i).sort if R.odd? && C.odd? p (R+1)*(C)/4+1-1 if R == C p (R)*(C)/2+1-1 if R != C elsif R.even? && C.odd? p (C)*R/2-1 elsif R.odd? && C.even? p (R+1)*C/2-1 elsif R.even? && C.even? p R*C/4-1 if R == C p R*C/2-1 if R != C end