process.stdin.resume();
process.stdin.setEncoding('utf8');

var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});

process.stdin.on('end', function() {
    Main(g_input.split(/\r?\n/));
});

var memo = {};

function Main(input) {
    var n = parseInt(input[0], 10);
    var worstRank = 0;
    var worstScore = 0;
    for (var i = 0; i < n; i++) {
        var tokens = input[i + 1].split(' ');
        var a = parseInt(tokens[0], 10);
        var b = parseInt(tokens[1], 10);

        if (a > worstRank) {
            worstRank = a;
            worstScore = b;
        }
    }

    var entryNumber = worstRank + worstScore;

    console.log(entryNumber);

    return 0;
}