#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
__attribute__((constructor)) void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
int main() {
  int N;
  cin >> N;
  int maxPlayer = 0;
  int minB = 1145141919;
  for (int i = 0; i < (N); i++) {
    int A, B;
    cin >> A >> B;
    if (B < minB) {
      maxPlayer = A + B;
      minB = B;
    }
  }
  cout << maxPlayer << endl;
}
