object Main extends App {

  val In = io.StdIn.readLine()
  val A = In.split(" ")

  var arr = Array.ofDim[Int](A(0).toInt, A(1).toInt)

  //0：表 1：裏
  def rev(a: Int): Int = {
    if (a == 0)
      return 1  //表→裏
    else
      return 0  //裏→表
  }

  //(i,j)の周辺のカードを裏返す
  for (i <- 0 to A(0).toInt - 1) {    //iは行操作と定義
    for (j <- 0 to A(1).toInt - 1) {  //jは列操作と定義
      //右
      if (i+1 != A(0).toInt)
        arr(i + 1)(j) = rev(arr(i + 1)(j))
      //左
      if (i-1 != -1)
        arr(i - 1)(j) = rev(arr(i - 1)(j))
      //上
      if (j+1 != A(1).toInt)
        arr(i)(j + 1) = rev(arr(i)(j + 1))
      //下
      if (j-1 != -1)
        arr(i)(j - 1) = rev(arr(i)(j - 1))
      //右上
      if (i+1 != A(0).toInt && j+1 != A(1).toInt)
        arr(i + 1)(j + 1) = rev(arr(i + 1)(j + 1))
      //右下
      if (i+1 != A(0).toInt && j-1 != -1)
        arr(i + 1)(j - 1) = rev(arr(i + 1)(j - 1))
      //左上
      if (i-1 != -1 && j+1 != A(1).toInt)
        arr(i - 1)(j + 1) = rev(arr(i - 1)(j + 1))
      //左下
      if (i-1 != -1 && j-1 != -1)
        arr(i - 1)(j - 1) = rev(arr(i - 1)(j - 1))
    }
  }

  var n = 0

  for (i <- 0 to A(0).toInt - 1) {
    for (j <- 0 to A(1).toInt - 1) {
      n += arr(i)(j)
    }
  }

  val N: Int = A(0).toInt * A(1).toInt - n

  print(N)

}
