(def mn (map #(Integer. %) (str/split (read-line) #" ")))

(defn flip-flip [n m]
  (cond
    (and (= m 1) (= n 1))
      1
    (= m 1)
      (let [t1 2
            t2 (- n 2)]
        t2)
    (= n 1)
      (let [t1 2
            t2 (- m 2)]
        t2)
    (and (>= m 2) (>= n 2))
      (let [t3 4
            t5 (+ (* 2 (- n 2)) (* 2 (- m 2)))
            t8 (- (* n m) (* 2 (- m 1)) (* 2 (- n 1)))]
        t8)))

(println (flip-flip (first mn) (last mn)))
