#include <iostream>
using namespace std;
int main(void){
  int n;
  int ma = 0;
  int mi;
  int ans;
  cin >> n;
  for(int i = 0; i < n; i++){
    int a, b;
    cin >> a >> b;
    if(a > ma) {
      ma = a;
      mi = b;
    }
  }
  cout << ma+mi << endl;
  return 0;
}