(define-values (m d) (apply values (map string->number (string-split (read-line) " ")))) (print (+ m d (if (and (= m 4) (= d 1)) 1 0)))