// url: http://tenka1-2017-beginner.contest.atcoder.jp/tasks/tenka1_2017_b

import std.algorithm, std.conv, std.range, std.stdio, std.string;

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

  auto maxA = 0, maxB = 0;
  foreach (_; 0..n) {
    auto rd = readln.split.to!(int[]), a = rd[0], b = rd[1];
    if (a > maxA) {
      maxA = a;
      maxB = b;
    }
  }

  writeln(maxA + maxB);
}
