#include <bits/stdc++.h>
using namespace std;
long long dx[] = {1, 0, -1, 0};
long long dy[] = {0, 1, 0, -1};
bool myComparison1(const pair<long long, long long> &a,
                   const pair<long long, long long> &b) {
  return a.second < b.second;
}
bool myComparison2(const pair<long long, long long> &a,
                   const pair<long long, long long> &b) {
  if (a.first == b.first) {
    return (a.second < b.second);
  }
  return (a.first < b.first);
}
long long gcd(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
long long expo(long long n, long long m, long long p) {
  long long r = 1;
  n = n % p;
  while (m > 0) {
    if (m % 2) r = (r * n) % p;
    n = (n * n) % p;
    m = m / 2;
  }
  return r % p;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
vector<long long> z_function(string s) {
  long long n = (long long)s.length();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
long long distance(long long x, long long y) { return (sqrt(x * 2 + y * 2)); }
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  vector<long long> x, y;
  for (long long i = 0; i < n; i++) {
    long long c, d;
    cin >> c >> d;
    x.push_back(c);
    y.push_back(d);
  }
  long long max = -1;
  long long X = 0, Y = 0;
  for (long long i = 0; i < n; i++) {
    if (x[i] + y[i] > max) {
      X = x[i];
      Y = y[i];
      max = X + Y;
    }
  }
  cout << max;
}

### Prompt

Please create a solution in cpp to the following problem:

There are n points on the plane, (x_1,y_1), (x_2,y_2), …, (x_n,y_n).

You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it lies inside the triangle or on the side of the triangle). Calculate the minimum length of the shorter side of the triangle.

Input

First line contains one integer n (1 ≤ n ≤ 10^5).

Each of the next n lines contains two integers x_i and y_i (1 ≤ x_i,y_i ≤ 10^9).

Output

Print the minimum length of the shorter side of the triangle. It can be proved that it's always an integer.

Examples

Input

3
1 1
1 2
2 1


Output

3

Input

4
1 1
1 2
2 1
2 2


Output

4

Note

Illustration for the first example: <image>

Illustration for the second example: <image>

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long dx[] = {1, 0, -1, 0};
long long dy[] = {0, 1, 0, -1};
bool myComparison1(const pair<long long, long long> &a,
                   const pair<long long, long long> &b) {
  return a.second < b.second;
}
bool myComparison2(const pair<long long, long long> &a,
                   const pair<long long, long long> &b) {
  if (a.first == b.first) {
    return (a.second < b.second);
  }
  return (a.first < b.first);
}
long long gcd(long long x, long long y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
long long expo(long long n, long long m, long long p) {
  long long r = 1;
  n = n % p;
  while (m > 0) {
    if (m % 2) r = (r * n) % p;
    n = (n * n) % p;
    m = m / 2;
  }
  return r % p;
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
vector<long long> z_function(string s) {
  long long n = (long long)s.length();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
long long distance(long long x, long long y) { return (sqrt(x * 2 + y * 2)); }
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  vector<long long> x, y;
  for (long long i = 0; i < n; i++) {
    long long c, d;
    cin >> c >> d;
    x.push_back(c);
    y.push_back(d);
  }
  long long max = -1;
  long long X = 0, Y = 0;
  for (long long i = 0; i < n; i++) {
    if (x[i] + y[i] > max) {
      X = x[i];
      Y = y[i];
      max = X + Y;
    }
  }
  cout << max;
}

```