program main_b
   implicit none
   integer(8) :: H, W

   read(*,*) H, W
   if (H==1 .or. W==1)  then
      print *, 1
      stop
   end if

   if (mod(H,2)==0) then
      print *, H/2*W
   else if (mod(W,2)==0) then
      print *, (H-1)/2*W + W/2
   else
      print *, (H-1)/2*W + (W/2)+1
   end if

end program main_b
