#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b, re;
  cin >> n >> re;
  while (n--) {
    cin >> a >> b;
    re = max(re, a + b);
  }
  cout << re << endl;
  return 0;
}
