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;
const int N = 2e6 + 7;
bool fg;
int n, k, pt, ans, p[N], pos[N], pot[N], fl[N];
long long s2, tg[N], fe[N], w[N], c[N], g[N], q[N], s[N], f1[N], f2[N], f4[N],
    f5[N], f7[N], f8[N];
inline void update(int t, long long x) {
  f1[t] += x, f2[t] += x, f4[t] += x, f7[t] -= x, f8[t] -= x;
}
inline long long getx(int t) {
  if (fl[t]) {
    return f5[t] - s2;
  }
  if (tg[t]) {
    tg[t << 1] += tg[t], update(t << 1, tg[t]);
    tg[t << 1 | 1] += tg[t], update(t << 1 | 1, tg[t]), tg[t] = 0;
  }
  if (s2 <= f2[t])
    return min(getx(t << 1 | 1), f5[t << 1] - s2);
  else
    return min(f8[t], getx(t << 1));
}
inline int getz(int t) {
  if (fl[t]) {
    if (f5[t] - s2 <= k) return fl[t];
    return 0;
  }
  if (tg[t]) {
    tg[t << 1] += tg[t], update(t << 1, tg[t]);
    tg[t << 1 | 1] += tg[t], update(t << 1 | 1, tg[t]), tg[t] = 0;
  }
  if (f5[t << 1 | 1] - s2 <= k) return getz(t << 1 | 1);
  return getz(t << 1);
}
inline int gety(int t) {
  if (fl[t]) {
    if (f5[t] - s2 <= k) return fl[t];
    return 0;
  }
  if (tg[t]) {
    tg[t << 1] += tg[t], update(t << 1, tg[t]);
    tg[t << 1 | 1] += tg[t], update(t << 1 | 1, tg[t]), tg[t] = 0;
  }
  if (s2 <= f2[t]) {
    int c = gety(t << 1 | 1);
    if (c == 0) return getz(t << 1);
    return c;
  } else {
    if (f8[t] <= k) {
      s2 = min(s2, f2[t]);
      return gety(t << 1 | 1);
    }
    return gety(t << 1);
  }
}
inline void build(int l, int r, int t) {
  if (l == r) {
    f1[t] = f2[t] = f4[t] = f5[t] = q[l], pos[t] = l, pot[l] = t, fl[t] = l;
    return;
  }
  int d = (l + r) >> 1;
  build(l, d, t << 1), build(d + 1, r, t << 1 | 1);
  f1[t] = f1[t << 1], f2[t] = f4[t << 1], f4[t] = min(f2[t], f4[t << 1 | 1]),
  f5[t] = min(f5[t << 1], f5[t << 1 | 1]);
  f7[t] = min(f7[t << 1], f8[t << 1]), s2 = f2[t], f8[t] = getx(t << 1 | 1);
}
inline int lowbit(int u) { return (u & (-u)); }
inline void addc(int u, long long z) {
  while (u <= n) fe[u] += z, u += lowbit(u);
}
inline long long getsum(int u) {
  long long ans = 0;
  while (u > 0) ans += fe[u], u -= lowbit(u);
  return ans;
}
inline void addx(int l, int r, int t, int ql, int qr, long long x) {
  if (l == ql && r == qr) {
    tg[t] += x, update(t, x);
    return;
  }
  if (tg[t]) {
    tg[t << 1] += tg[t], update(t << 1, tg[t]);
    tg[t << 1 | 1] += tg[t], update(t << 1 | 1, tg[t]), tg[t] = 0;
  }
  int d = (l + r) >> 1;
  if (ql <= d) addx(l, d, t << 1, ql, min(qr, d), x);
  if (d + 1 <= qr) addx(d + 1, r, t << 1 | 1, max(d + 1, ql), qr, x);
  f1[t] = f1[t << 1], f2[t] = f4[t << 1], f4[t] = min(f2[t], f4[t << 1 | 1]),
  f5[t] = min(f5[t << 1], f5[t << 1 | 1]);
  f7[t] = min(f7[t << 1], f8[t << 1]), s2 = f2[t], f8[t] = getx(t << 1 | 1);
}
inline void getval(int u, long long k) {
  long long c = k - s[u - 1];
  s[u - 1] = k;
  addc(u, c);
  addx(1, n, 1, u - 1, n, -c);
}
inline void getvac(int l, int r, int t, int ql, int qr) {
  if (tg[t]) {
    tg[t << 1] += tg[t], update(t << 1, tg[t]);
    tg[t << 1 | 1] += tg[t], update(t << 1 | 1, tg[t]), tg[t] = 0;
  }
  if (l == ql && r == qr) {
    pt = max(pt, gety(t)), s2 = min(s2, f4[t]);
    return;
  }
  int d = (l + r) >> 1;
  if (ql <= d) getvac(l, d, t << 1, ql, min(d, qr));
  if (d + 1 <= qr) getvac(d + 1, r, t << 1 | 1, max(d + 1, ql), qr);
}
int main() {
  cin >> n >> k;
  ans = 1;
  for (int i = 1; i < n; i++) scanf("%d", &w[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]);
  g[1] = 0, q[n] = 0;
  for (int i = 2; i <= n; i++) g[i] = g[i - 1] + c[i - 1] - w[i - 1];
  for (int i = n - 1; i >= 1; i--) q[i] = q[i + 1] + c[i + 1] - w[i];
  p[++p[0]] = n;
  build(1, n, 1);
  for (int i = n - 1; i >= 1; i--) {
    while (p[0] > 0 && g[p[p[0]]] >= g[i]) {
      if (p[0] > 1) getval(p[p[0] - 1], 0);
      p[0]--;
    }
    p[++p[0]] = i;
    if (p[0] > 1) getval(p[p[0] - 1], g[i] - g[p[p[0] - 1]]);
    int lt = i, rt = n, pc = 0;
    while (lt <= rt) {
      int d = (lt + rt) >> 1;
      if (getsum(d) <= k)
        pc = d, lt = d + 1;
      else
        rt = d - 1;
    }
    pt = i, s2 = 1e18, getvac(1, n, 1, i, pc), ans = max(ans, pt - i + 1);
  }
  cout << ans << endl;
}