(def A (read))
(def B (read))
(println (cond
  (and (= A 1) (= B 2)) 3
  (and (= A 1) (= B 3)) 2
  (and (= A 2) (= B 1)) 3
  (and (= A 2) (= B 3)) 1
  (and (= A 3) (= B 1)) 2
  (and (= A 3) (= B 2)) 1))