#include <bits/stdc++.h>
using namespace std;
int n, s;
int main() {
  cin >> n >> s;
  int ans = s;
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    ans = max(ans, x + y);
  }
  cout << ans << "\n";
  return 0;
}
