(define (read-list n) (cond [(zero? n) '()] [else (let* ([a (read)] [b (read)]) (cons (list a b) (read-list (- n 1))))])) (define (solve lx) (let ([sa (apply + (map car lx))] [sb (apply + (map cadr lx))]) (+ 1 (min sa sb)))) (define (main args) (let* ([n (read)] [lab (read-list (- n 1))]) (print (solve lab))) 0)