#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin.tie(0);
  cin >> n;
  long m = 0;
  for (int i = 0; i < n; i++) {
    long x, y;
    cin >> x >> y;
    if (min(x, y) + max(x, y) > m) m = min(x, y) + max(x, y);
  }
  cout << m;
  return 0;
}
