import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val H = input.nextLong()
    val W = input.nextLong()
    
    if (H == 1L || W == 1L) {
      println(1)
    } else {
      val area = H * W
      var reachable = (area / 2) + if (area % 2 == 1L) 1 else 0
    
      println(reachable)
    }
  }
}