w,h=gets.split.map &:to_i p (w+1)*(h+1)-(w*h%2>0 ? [w,h].min : w%2>0 ? w : h%2>0 ? h : [w,h].max+(w==h ? 1 : 0))