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 = 1e5 + 5;
int n, k, i, j, w[N], g[N], M, st[N], tp, st2[N], tp2, ans;
long long s1[N], s2[N], t1[N * 3], t2[N * 3], tg[N * 3], mx[N], mxx[N], vv[N],
    vvv[N];
inline long long ask1(int l, int r) {
  long long ans = -(1ll << 60);
  for (l += M - 1, r += M + 1; l ^ r ^ 1; l >>= 1, r >>= 1) {
    if (!(l & 1)) ans = max(ans, t1[l ^ 1]);
    if (r & 1) ans = max(ans, t1[r ^ 1]);
  }
  return ans;
}
inline void psh(int i, const long long& v) {
  tg[i] += v;
  t2[i] += v;
}
inline void upd(int i) { t2[i] = min(t2[i << 1], t2[i << 1 | 1]) + tg[i]; }
inline void add(int l, int r, long long v) {
  for (l += M - 1, r += M + 1; l ^ r ^ 1; upd(l >>= 1), upd(r >>= 1)) {
    if (!(l & 1)) psh(l ^ 1, v);
    if (r & 1) psh(r ^ 1, v);
  }
  for (; l >>= 1; upd(l))
    ;
}
long long sm;
inline int ask2() {
  int i = M;
  sm = 0;
  for (; t2[i ^ 1] > k; i >>= 1)
    ;
  for (i ^= 1; i < M;) sm += tg[i], i = i << 1 | (t2[i << 1] + sm > k);
  sm += t2[i];
  return i - M;
}
inline int ask3(int l, int r, long long v) {
  static int A[99], B[99];
  int Axb = 0, Bxb = 0, i;
  for (l += M - 1, r += M + 1; l ^ r ^ 1; l >>= 1, r >>= 1) {
    if (!(l & 1)) A[++Axb] = l ^ 1;
    if (r & 1) B[++Bxb] = r ^ 1;
  }
  for (i = 1; i <= Bxb; ++i)
    if (v - t1[B[i]] <= k) break;
  if (i <= Bxb)
    i = B[i];
  else {
    for (i = Axb; i; --i)
      if (v - t1[A[i]] <= k) break;
    i = A[i];
  }
  for (; i < M;) i = i << 1 | (v - t1[i << 1 | 1] <= k);
  return i - M;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (M = 1; M < n + 2; M <<= 1)
    ;
  for (i = 1; i < n; ++i) cin >> w[i];
  for (i = 1; i <= n; ++i)
    cin >> g[i], s2[i] = s1[i - 1] - w[i - 1], s1[i] = s2[i] + g[i],
                 t1[i + M] = s1[i];
  for (i = M - 1; i; --i) t1[i] = max(t1[i << 1], t1[i << 1 | 1]);
  st[0] = n + 1;
  for (i = n; i; --i) {
    for (; tp && s2[i] < s2[st[tp]]; --tp) {
      if (tp > 1) add(1, tp - 1, -vv[tp]);
      if (st2[tp2] == tp)
        add(st2[tp2 - 1] + 1, tp - 1, -mx[tp]), add(tp, tp, -vvv[tp2]), --tp2;
      else
        add(tp, tp, mxx[tp]);
    }
    st[++tp] = i;
    if (tp > 1) vv[tp] = s2[i] - s2[st[tp - 1]], add(1, tp - 1, vv[tp]);
    mx[tp] = max(mxx[tp] = ask1(i, st[tp - 1] - 1) - s2[i],
                 vv[tp] + s1[st[tp - 1] - 1] - s2[i]);
    for (; tp2 && mx[st2[tp2]] < mx[tp]; --tp2)
      add(st2[tp2 - 1] + 1, st2[tp2] - 1, -mx[st2[tp2]]),
          add(st2[tp2], st2[tp2], -mxx[st2[tp2]]),
          add(st2[tp2], st2[tp2], -vvv[tp2]);
    st2[++tp2] = tp;
    vvv[tp2] = 0;
    add(st2[tp2 - 1] + 1, tp - 1, mx[tp]);
    if (tp2 > 1 && mx[tp] > mxx[st2[tp2 - 1]])
      add(st2[tp2 - 1], st2[tp2 - 1], -vvv[tp2 - 1]),
          add(st2[tp2 - 1], st2[tp2 - 1],
              vvv[tp2 - 1] = mx[tp] - mxx[st2[tp2 - 1]]);
    j = ask2();
    ans = max(ans, ask3(st[j], st[j - 1] - 1, sm + mxx[j] + s2[st[j]]) - i + 1);
  }
  cout << ans << endl;
  return 0;
}