import java.lang.Math.max

fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    var (a, b) = Pair(0, 0)
    for (i in 1..N) {
        val (Ai, Bi) = readLine()!!.split(' ').map(String::toInt)
        if (a < Ai) {
            a = Ai
            b = Bi
        }
    }
    print(a + b)
}