Problem: Kekoland is a country with n beautiful cities numbered from left to right and connected by n - 1 roads. The i-th road connects cities i and i + 1 and length of this road is wi kilometers. 

When you drive in Kekoland, each time you arrive in city i by car you immediately receive gi liters of gas. There is no other way to get gas in Kekoland.

You were hired by the Kekoland president Keko to organize the most beautiful race Kekoland has ever seen. Let race be between cities l and r (l ≤ r). Race will consist of two stages. On the first stage cars will go from city l to city r. After completing first stage, next day second stage will be held, now racers will go from r to l with their cars. Of course, as it is a race, racers drive directly from start city to finish city. It means that at the first stage they will go only right, and at the second stage they go only left. Beauty of the race between l and r is equal to r - l + 1 since racers will see r - l + 1 beautiful cities of Kekoland. Cars have infinite tank so racers will take all the gas given to them.

At the beginning of each stage racers start the race with empty tank (0 liters of gasoline). They will immediately take their gasoline in start cities (l for the first stage and r for the second stage) right after the race starts. 

It may not be possible to organize a race between l and r if cars will run out of gas before they reach finish.

You have k presents. Each time you give a present to city i its value gi increases by 1. You may distribute presents among cities in any way (also give many presents to one city, each time increasing gi by 1). What is the most beautiful race you can organize?

Each car consumes 1 liter of gas per one kilometer.

Input

The first line of the input contains two integers n and k (2 ≤ n ≤ 100 000, 0 ≤ k ≤ 109) — the number of cities in Kekoland and the number of presents you have, respectively.

Next line contains n - 1 integers. The i-th of them is wi (1 ≤ wi ≤ 109) — the length of the road between city i and i + 1. 

Next line contains n integers. The i-th of them is gi (0 ≤ gi ≤ 109) — the amount of gas you receive every time you enter city i.

Output

Print a single line — the beauty of the most beautiful race you can organize.

Examples

Input

4 4
2 2 2
1 1 1 1


Output

4


Input

8 5
2 2 2 3 7 3 1
1 3 1 5 4 0 2 5


Output

7

Note

In first sample if you give one present to each city then it will be possible to make a race between city 1 and city 4.

In second sample you should add 1 to g5 and 4 to g6, then it will be possible to make a race between cities 2 and 8. 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
inline long long Getint() {
  char ch = getchar();
  long long x = 0, fh = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') fh = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    (x *= 10) += ch ^ 48;
    ch = getchar();
  }
  return x * fh;
}
const long long inf = 1ll << 60;
const int N = 100005;
struct nod {
  int x, y;
  long long r;
  nod(int a = 0, int b = 0, long long c = 0) {
    x = a;
    y = b;
    r = c;
  }
} st[N];
int n, nxt[N], tp;
long long K, d[N], a[N], s[N];
int L[N << 2], R[N << 2];
long long dx[2][N << 2], mi[2][N << 2], mr[N << 2];
inline void addval(int ty, int v, long long w) {
  dx[ty][v] += w;
  mi[ty][v] += w;
}
inline void pd(int v) {
  int ls = v << 1, rs = v << 1 | 1;
  for (int i = 0; i <= 1; i++)
    if (dx[i][v]) {
      addval(i, ls, dx[i][v]), addval(i, rs, dx[i][v]);
      dx[i][v] = 0;
    }
}
long long query(int v, long long w) {
  if (mi[1][v] < 0) return -1;
  if (L[v] == R[v]) {
    return min(w, mi[0][v]) >= mr[v] ? L[v] : -1;
  }
  int ls = v << 1, rs = v << 1 | 1;
  pd(v);
  if (min(w, mi[0][ls]) < mr[rs]) return query(v << 1, w);
  long long p = query(v << 1 | 1, min(w, mi[0][ls]));
  if (p != -1) return p;
  return query(v << 1, w);
}
inline void up(int v) {
  int ls = v << 1, rs = v << 1 | 1;
  mr[v] = min(mr[ls], mr[rs]);
  mi[0][v] = min(mi[0][ls], mi[0][rs]);
  mi[1][v] = max(mi[1][ls], mi[1][rs]);
}
void build(int v, int l, int r) {
  L[v] = l;
  R[v] = r;
  int mid = l + r >> 1;
  if (l == r) {
    mr[v] = d[r] - s[r];
    mi[0][v] = inf;
    mi[1][v] = K;
    return;
  }
  build(v << 1, l, mid);
  build(v << 1 | 1, mid + 1, r);
  up(v);
}
void modify(int v, int x, int y, int ty, long long w) {
  if (y < x) return;
  if (x <= L[v] && R[v] <= y) {
    for (int i = 0; i <= ty; i++) addval(i, v, w);
    return;
  }
  int mid = R[v << 1];
  pd(v);
  if (x <= mid) modify(v << 1, x, y, ty, w);
  if (mid < y) modify(v << 1 | 1, x, y, ty, w);
  up(v);
}
long long ask(int v, int x) {
  if (L[v] == R[v]) {
    return mi[1][v];
  }
  int mid = R[v << 1];
  pd(v);
  return ask(v << 1 | (mid < x), x);
}
long long ask2(int v, int x) {
  if (L[v] == R[v]) {
    return mi[0][v];
  }
  int mid = R[v << 1];
  pd(v);
  return ask2(v << 1 | (mid < x), x);
}
long long ask3(int v, int x) {
  if (L[v] == R[v]) {
    return mr[v];
  }
  int mid = R[v << 1];
  pd(v);
  return ask3(v << 1 | (mid < x), x);
}
int main() {
  long long x, y, z;
  n = Getint();
  K = Getint();
  for (int i = 2; i <= n; i++) {
    d[i] = Getint();
    d[i] += d[i - 1];
  }
  d[n + 1] = inf;
  for (int i = 1; i <= n; i++) {
    a[i] = Getint();
    s[i] = s[i - 1] + a[i];
  }
  build(1, 1, n);
  long long Ans = 0;
  for (int i = n; i >= 1; i--) {
    long long res = a[i] - (d[i + 1] - d[i]);
    if (res < 0) {
      st[++tp] = nod(i, i, a[i]);
      nxt[i] = i;
      modify(1, i + 1, n, 1, -(d[i + 1] - d[i]) + a[i]);
    } else {
      while (tp) {
        y = st[tp].y;
        z = st[tp].r;
        tp--;
        modify(1, y + 1, n, 1, +(d[y + 1] - d[y]) - z);
        if (d[y + 1] - d[y] <= z + res) {
          res += z - (d[y + 1] - d[y]);
        } else {
          nxt[i] = y;
          res += z;
          break;
        }
      }
      st[++tp] = nod(i, nxt[i], res);
      y = nxt[i];
      modify(1, y + 1, n, 1, -(d[y + 1] - d[y]) + res);
    }
    long long r = query(1, inf);
    Ans = max(Ans, r - i + 1);
    modify(1, i, i, 0, -inf + d[i - 1] - s[i - 1] + K);
  }
  cout << Ans << '\n';
  return 0;
}