'use strict'
 
function Main(input) {
    var params = input.split('\n');
    const n = params[0];
    
    let minScore = 0;
    let lowest = 0;
    for (let i = 1; i < params.length; i++) {
        const arg = params[i].split(' ');
        if (arg[0] > lowest) {
            lowest = parseInt(arg[0], 10);
            minScore = parseInt(arg[1], 10);
        }
    }
    console.log(lowest + minScore);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));