#include <bits/stdc++.h>
using namespace std;
long long npr(long long n, long long r) {
  long long res = 1;
  for (long long i = n; i > n - r; i--) res *= i;
  return res;
}
long long ncr(long long n, long long r) {
  if (r > n) return 0;
  if (r * 2 > n) r = n - r;
  if (r == 0) return 1;
  long long res = n;
  for (long long i = 2; i <= r; i++) {
    res *= (n - i + 1);
    res /= i;
  }
  return res;
}
string to_str(long long n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
long long to_int(string str) {
  long long val;
  stringstream stream;
  stream << str;
  stream >> val;
  return val;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long n1, long long n2) {
  long long m = n1 * n2 / gcd(n1, n2);
  return m;
}
string binary(long long n) {
  string result;
  do result.push_back('0' + (n & 1));
  while (n >>= 1);
  reverse(result.begin(), result.end());
  return result;
}
long long fast_power(long long x, long long y) {
  if (y == 0) return 1;
  long long temp = fast_power(x, y / 2);
  temp = (temp * temp);
  if (y % 2 != 0) temp = temp * x;
  return temp;
}
bool comp(pair<int, int> v1, pair<int, int> v2) {
  if (v1.first == v2.first) {
    if (v1.second < v2.second)
      return true;
    else
      return false;
  }
  return (v1.first > v2.first);
}
long long n, x, y, z, c, c1, c2, c3, c4, k, k1, k2, t, arr;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x + y > c) {
      c = x + y;
    }
  }
  cout << c;
  return 0;
}

### Prompt

Create a solution in CPP for 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 npr(long long n, long long r) {
  long long res = 1;
  for (long long i = n; i > n - r; i--) res *= i;
  return res;
}
long long ncr(long long n, long long r) {
  if (r > n) return 0;
  if (r * 2 > n) r = n - r;
  if (r == 0) return 1;
  long long res = n;
  for (long long i = 2; i <= r; i++) {
    res *= (n - i + 1);
    res /= i;
  }
  return res;
}
string to_str(long long n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
long long to_int(string str) {
  long long val;
  stringstream stream;
  stream << str;
  stream >> val;
  return val;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long n1, long long n2) {
  long long m = n1 * n2 / gcd(n1, n2);
  return m;
}
string binary(long long n) {
  string result;
  do result.push_back('0' + (n & 1));
  while (n >>= 1);
  reverse(result.begin(), result.end());
  return result;
}
long long fast_power(long long x, long long y) {
  if (y == 0) return 1;
  long long temp = fast_power(x, y / 2);
  temp = (temp * temp);
  if (y % 2 != 0) temp = temp * x;
  return temp;
}
bool comp(pair<int, int> v1, pair<int, int> v2) {
  if (v1.first == v2.first) {
    if (v1.second < v2.second)
      return true;
    else
      return false;
  }
  return (v1.first > v2.first);
}
long long n, x, y, z, c, c1, c2, c3, c4, k, k1, k2, t, arr;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x + y > c) {
      c = x + y;
    }
  }
  cout << c;
  return 0;
}

```