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>
template <typename _Tp>
void read(_Tp &x) {
  char ch(getchar());
  bool f(false);
  while (!isdigit(ch)) f |= ch == 45, ch = getchar();
  x = ch & 15, ch = getchar();
  while (isdigit(ch)) x = x * 10 + (ch & 15), ch = getchar();
  if (f) x = -x;
}
template <typename _Tp, typename... Args>
void read(_Tp &t, Args &...args) {
  read(t);
  read(args...);
}
template <typename _Tp>
inline _Tp max(_Tp a, _Tp b) {
  return a < b ? b : a;
}
const int N = 100005;
int w[N], g[N], n, k;
long long sg[N], sw[N], A[N], B[N];
long long mb[N << 2], mc[N << 2], tag[N << 2];
inline void pushup(int x) {
  mb[x] = max(mb[((x) << 1)], mb[((x) << 1 | 1)]),
  mc[x] = max(mc[((x) << 1)], mc[((x) << 1 | 1)]);
}
void build(int l, int r, int cur) {
  if (l == r) return mb[cur] = B[l], mc[cur] = B[l], void();
  int mid = (l + r) >> 1;
  build(l, mid, ((cur) << 1)), build(mid + 1, r, ((cur) << 1 | 1));
  pushup(cur);
}
inline void upd(int cur, long long C) { tag[cur] += C, mc[cur] += C; }
inline void pushdown(int cur) {
  if (tag[cur])
    upd(((cur) << 1), tag[cur]), upd(((cur) << 1 | 1), tag[cur]), tag[cur] = 0;
}
void Update(int L, int R, int C, int l, int r, int cur) {
  if (L <= l && r <= R) return upd(cur, C);
  int mid = (l + r) >> 1;
  pushdown(cur);
  if (L <= mid) Update(L, R, C, l, mid, ((cur) << 1));
  if (R > mid) Update(L, R, C, mid + 1, r, ((cur) << 1 | 1));
  pushup(cur);
}
int _;
long long ask(int L, int R, long long mx, int l, int r, int cur) {
  if (l == r) {
    if (mb[cur] + k >= mx) _ = max(_, l);
    return max(mx, mc[cur]);
  }
  int mid = (l + r) >> 1;
  pushdown(cur);
  if (L <= l && r <= R) {
    long long tp = max(mx, mc[((cur) << 1)]);
    mb[((cur) << 1 | 1)] + k >= tp ? ask(L, R, tp, mid + 1, r, ((cur) << 1 | 1))
                                   : ask(L, R, mx, l, mid, ((cur) << 1));
    return max(mx, mc[cur]);
  }
  if (L <= mid) mx = ask(L, R, mx, l, mid, ((cur) << 1));
  if (R > mid) mx = ask(L, R, mx, mid + 1, r, ((cur) << 1 | 1));
  return mx;
}
int st[N], top;
int main() {
  read(n, k);
  for (int i = 1; i < n; ++i) read(w[i]);
  for (int i = 1; i <= n; ++i) read(g[i]);
  for (int i = 1; i <= n; ++i)
    sw[i] = sw[i - 1] - w[i], sg[i] = sg[i - 1] + g[i], A[i] = sg[i] + sw[i],
    B[i] = sg[i] + sw[i - 1];
  build(1, n, 1), st[0] = n + 1, st[top = 1] = n;
  int ans = 0;
  for (int l = n; l >= 1; --l) {
    while (top && A[l - 1] <= A[st[top]]) {
      if (top > 1) Update(st[top - 1], n, A[st[top - 1]] - A[st[top]], 1, n, 1);
      --top;
    }
    if (top) Update(st[top], n, A[l - 1] - A[st[top]], 1, n, 1);
    st[++top] = l - 1;
    int L = 0, R = top, mid;
    while (L < R)
      mid = (L + R + 1) >> 1, A[l - 1] - A[st[mid]] > k ? L = mid : R = mid - 1;
    _ = 0, ask(l, std::min(n, st[L]), -1e18, 1, n, 1),
    ans = max(ans, _ - l + 1);
  }
  printf("%d\n", ans);
  return 0;
}