void main()
{
    int n = readln.chomp.to!int;

    int[] a = new int[n], b = new int[n];
    foreach (i; 0 .. n)
    {
        int[] tmp = readln.split.to!(int[]);
        a[i] = tmp[0], b[i] = tmp[1];
    }
    zip(a, b).sort!((x, y) => x[0] > y[0]);

    writeln(a[0] + b[0]);
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;