(defn comb [n r]
  (if (< n r)
    0
    (let [ls (range 1 (inc n))
          p  (reduce * (take-last r ls))
          r! (reduce * (take r ls))]
      (quot p r!))))

(let [n (read)
      m (read)]
  (println (+ (comb n 2)
              (comb m 2))))