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;
int n, k, v[100500], s[100500], st[100500], ct, is2[100500];
long long su1[100500], su2[100500];
struct segt1 {
  struct node {
    int l, r;
    long long mx, lz, mn, mx2;
  } e[100500 * 4];
  void pushdown(int x) {
    if (!e[x].lz) return;
    e[x << 1].lz += e[x].lz;
    e[x << 1].mx += e[x].lz;
    e[x << 1].mn += e[x].lz;
    e[x << 1 | 1].mn += e[x].lz;
    e[x << 1 | 1].lz += e[x].lz;
    e[x << 1 | 1].mx += e[x].lz;
    e[x].lz = 0;
  }
  long long query1(int x, long long v) {
    if (e[x].mx <= v) return v - e[x].mx2;
    if (e[x].l == e[x].r) return e[x].mx - e[x].mx2;
    pushdown(x);
    if (e[x << 1].mx <= v)
      return min(query1(x << 1 | 1, v), v - e[x << 1].mx2);
    else
      return min(query1(x << 1, v), e[x].mn);
  }
  void pushup(int x) {
    e[x].mn = query1(x << 1 | 1, e[x].mx);
    e[x].mx = max(e[x << 1].mx, e[x << 1 | 1].mx);
  }
  void build(int x, int l, int r) {
    e[x].l = l;
    e[x].r = r;
    if (l == r) {
      e[x].mx = e[x].mx2 = su1[l];
      return;
    }
    int mid = (l + r) >> 1;
    build(x << 1, l, mid);
    build(x << 1 | 1, mid + 1, r);
    e[x].mx2 = max(e[x << 1].mx2, e[x << 1 | 1].mx2);
    pushup(x);
  }
  void modify(int x, int l, int r, long long v) {
    if (r < l) return;
    if (l < 1) l = 1;
    if (e[x].l == l && e[x].r == r) {
      e[x].lz += v;
      e[x].mx += v;
      e[x].mn += v;
      return;
    }
    pushdown(x);
    int mid = (e[x].l + e[x].r) >> 1;
    if (mid >= r)
      modify(x << 1, l, r, v);
    else if (mid < l)
      modify(x << 1 | 1, l, r, v);
    else
      modify(x << 1, l, mid, v), modify(x << 1 | 1, mid + 1, r, v);
    pushup(x);
  }
  pair<long long, long long> query2(int x, int l, int r, long long v) {
    if (e[x].l == l && e[x].r == r)
      return make_pair(query1(x, v), max(e[x].mx, v));
    pushdown(x);
    int mid = (e[x].l + e[x].r) >> 1;
    if (mid >= r)
      return query2(x << 1, l, r, v);
    else if (mid < l)
      return query2(x << 1 | 1, l, r, v);
    else {
      pair<long long, long long> st = query2(x << 1, l, mid, v),
                                 st2 =
                                     query2(x << 1 | 1, mid + 1, r, st.second);
      return make_pair(min(st.first, st2.first), st2.second);
    }
  }
} tr1;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) scanf("%d", &s[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &v[i]);
  for (int i = 1; i <= n; i++)
    su1[i] = su2[i - 1] + v[i], su2[i] = su1[i] - s[i];
  tr1.build(1, 1, n);
  int as = 1;
  st[0] = n + 1;
  for (int i = n; i >= 1; i--) {
    while (ct && su2[st[ct]] >= su2[i - 1])
      tr1.modify(1, st[ct], st[ct - 1] - 1, su2[st[ct]]), is2[st[ct]] = 0, ct--;
    tr1.modify(1, i - 1, st[ct] - 1, -su2[i - 1]);
    st[++ct] = i - 1;
    is2[i - 1] = ct;
    tr1.modify(1, i, n, su2[i - 1]);
    int lb = i, rb = n, as1 = i;
    while (lb <= rb) {
      int mid = (lb + rb) >> 1, fg1 = is2[mid];
      if (fg1) tr1.modify(1, st[fg1], st[fg1 - 1] - 1, su2[st[fg1]]);
      if (tr1.query2(1, mid, n, tr1.query2(1, i, mid, -1e17).second).first <= k)
        as1 = mid, lb = mid + 1;
      else
        rb = mid - 1;
      if (fg1) tr1.modify(1, st[fg1], st[fg1 - 1] - 1, -su2[st[fg1]]);
    }
    if (as < as1 - i + 1) as = as1 - i + 1;
    tr1.modify(1, i, n, -su2[i - 1]);
  }
  printf("%d\n", as);
}