#include <bits/stdc++.h>
using namespace std;
void ma7moud_7amdy() { cout << "ma7moud el3la" << '\n'; }
long long Ciel(long long x, long long y) { return (x + y - 1) / y; }
void run() {}
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long gcd(long long x, long long y) {
  return (y == 0) ? abs(x) : gcd(y, x % y);
}
unsigned long long lcm(long long x, long long y) {
  return abs(x / gcd(x, y) * y);
}
unsigned long long nCr(long long n, long long r) {
  unsigned long long ans = 1;
  long long div = 1;
  if (n)
    for (long long i = r + 1; i <= n; i++) {
      ans = ans * i;
      ans /= div;
      div++;
    }
  return ans;
}
long long power(long long x, long long y, int mod) {
  if (y == 0) return 1;
  if (y == 1) return x % mod;
  long long r = power(x, y >> 1, mod);
  return (((r * r) % mod) * power(x, y & 1, mod)) % mod;
}
bool vis[(long long)1e6 + 5];
void save() {
  for (int i = 2; i <= 1e6; i++) {
    if (!vis[i]) {
      for (int j = 2 * i; j < 1e6; j++) {
        vis[j] = 1;
      }
    }
  }
}
vector<long long> v(5);
long long solve(long long id, long long cnt, long long me, long long cur) {
  if (id == 5) return (cnt & 1) ? -me / cur : me / cur;
  long long ret = 0;
  ret += solve(id + 1, cnt, me, cur);
  ret += solve(id + 1, cnt + 1, me, lcm(cur, v[id]));
  return ret;
}
long long modInverse(long long b, long long mod) {
  return power(b, mod - 2, mod);
}
long long modInv(long long a, long long m) {
  long long m0 = m, t, q;
  long long x0 = 0, x1 = 1;
  if (m == 1) return 0;
  while (a > 1) {
    q = a / m;
    t = m;
    m = a % m, a = t;
    t = x0;
    x0 = x1 - q * x0;
    x1 = t;
  }
  if (x1 < 0) x1 += m0;
  return x1;
}
int main() {
  run();
  fast();
  long long n, a, b, md;
  cin >> n;
  long long mx = 0;
  while (n--) {
    cin >> a >> b;
    mx = max(mx, a + b);
  }
  cout << mx;
}

### Prompt

Please formulate a cpp solution 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;
void ma7moud_7amdy() { cout << "ma7moud el3la" << '\n'; }
long long Ciel(long long x, long long y) { return (x + y - 1) / y; }
void run() {}
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long gcd(long long x, long long y) {
  return (y == 0) ? abs(x) : gcd(y, x % y);
}
unsigned long long lcm(long long x, long long y) {
  return abs(x / gcd(x, y) * y);
}
unsigned long long nCr(long long n, long long r) {
  unsigned long long ans = 1;
  long long div = 1;
  if (n)
    for (long long i = r + 1; i <= n; i++) {
      ans = ans * i;
      ans /= div;
      div++;
    }
  return ans;
}
long long power(long long x, long long y, int mod) {
  if (y == 0) return 1;
  if (y == 1) return x % mod;
  long long r = power(x, y >> 1, mod);
  return (((r * r) % mod) * power(x, y & 1, mod)) % mod;
}
bool vis[(long long)1e6 + 5];
void save() {
  for (int i = 2; i <= 1e6; i++) {
    if (!vis[i]) {
      for (int j = 2 * i; j < 1e6; j++) {
        vis[j] = 1;
      }
    }
  }
}
vector<long long> v(5);
long long solve(long long id, long long cnt, long long me, long long cur) {
  if (id == 5) return (cnt & 1) ? -me / cur : me / cur;
  long long ret = 0;
  ret += solve(id + 1, cnt, me, cur);
  ret += solve(id + 1, cnt + 1, me, lcm(cur, v[id]));
  return ret;
}
long long modInverse(long long b, long long mod) {
  return power(b, mod - 2, mod);
}
long long modInv(long long a, long long m) {
  long long m0 = m, t, q;
  long long x0 = 0, x1 = 1;
  if (m == 1) return 0;
  while (a > 1) {
    q = a / m;
    t = m;
    m = a % m, a = t;
    t = x0;
    x0 = x1 - q * x0;
    x1 = t;
  }
  if (x1 < 0) x1 += m0;
  return x1;
}
int main() {
  run();
  fast();
  long long n, a, b, md;
  cin >> n;
  long long mx = 0;
  while (n--) {
    cin >> a >> b;
    mx = max(mx, a + b);
  }
  cout << mx;
}

```