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 long long inf = 1ll << 60;
const int _inf = 1 << 30;
struct WXHAKIOI {
  long long mxs, val, mnp, mxc, atg;
} s[301000 << 2];
struct edge {
  int r, nxt;
} e[301000];
long long pre[301000], suf[301000], g[301000], w[301000];
int fa[301000], K, head[301000], ret, tp, sta[301000], esz, n, ans;
void addedge(int u, int v) {
  e[++esz].r = v;
  e[esz].nxt = head[u];
  head[u] = esz;
}
void pd(int o) {
  int ls = o << 1, rs = o << 1 | 1;
  if (!s[o].atg) return;
  s[ls].atg += s[o].atg, s[ls].mxs += s[o].atg;
  s[ls].val += s[o].atg, s[ls].mxc += s[o].atg;
  s[rs].atg += s[o].atg, s[rs].mxs += s[o].atg;
  s[rs].val += s[o].atg, s[rs].mxc += s[o].atg;
  s[o].atg = 0;
}
long long qmax(int o, int l, int r, int ql, int qr) {
  if (ql > r || qr < l) return -inf;
  if (ql <= l && r <= qr) return s[o].mxs;
  int mid = l + r >> 1;
  pd(o);
  if (qr <= mid)
    return qmax(o << 1, l, mid, ql, qr);
  else if (ql > mid)
    return qmax(o << 1 | 1, mid + 1, r, ql, qr);
  else
    return max(qmax(o << 1, l, mid, ql, qr),
               qmax(o << 1 | 1, mid + 1, r, ql, qr));
}
long long qval(int o, int l, int r, long long mx) {
  if (l == r) return s[o].mnp + mx;
  int mid = l + r >> 1, ls = o << 1, rs = o << 1 | 1;
  pd(o);
  if (s[ls].mxs >= mx)
    return min(qval(ls, l, mid, mx), s[rs].val);
  else
    return min(mx + s[ls].mnp, qval(rs, mid + 1, r, mx));
}
void upd(int o, int l, int r) {
  int mid = l + r >> 1;
  s[o].mxs = max(s[o << 1].mxs, s[o << 1 | 1].mxs);
  s[o].mxc = min(s[o << 1].mxc, s[o << 1 | 1].mxc);
  s[o << 1 | 1].val = qval(o << 1 | 1, mid + 1, r, s[o << 1].mxs);
}
void mdy(int o, int l, int r, int ql, int qr, long long t) {
  if (ql <= l && r <= qr) {
    s[o].mxc += t, s[o].atg += t;
    s[o].val += t, s[o].mxs += t;
    return;
  }
  int mid = l + r >> 1;
  pd(o);
  if (ql <= mid) mdy(o << 1, l, mid, ql, qr, t);
  if (qr > mid) mdy(o << 1 | 1, mid + 1, r, ql, qr, t);
  upd(o, l, r);
}
void qry(int o, int l, int r, int ql, int qr, long long mx) {
  if (ql > qr) return;
  if (ql <= l && r <= qr) {
    long long x = qval(o, l, r, mx);
    if (x > K) return;
    ret = max(ret, l);
    if (l == r) return;
  }
  int mid = l + r >> 1;
  pd(o);
  if (qr > mid)
    qry(o << 1 | 1, mid + 1, r, ql, qr, max(mx, qmax(o << 1, l, mid, ql, qr)));
  if (ql <= mid && ret <= mid) qry(o << 1, l, mid, ql, qr, mx);
}
void build(int o, int l, int r) {
  if (l == r) {
    s[o].mnp = -suf[l];
    s[o].mxs = suf[l];
    return;
  }
  int mid = l + r >> 1;
  build(o << 1, l, mid);
  build(o << 1 | 1, mid + 1, r);
  s[o].mnp = min(s[o << 1].mnp, s[o << 1 | 1].mnp);
  upd(o, l, r);
}
int find(int o, int l, int r) {
  if (l == r) {
    return l + 1;
  }
  int mid = l + r >> 1;
  pd(o);
  if (s[o << 1 | 1].mxc <= K)
    return find(o << 1 | 1, mid + 1, r);
  else
    return find(o << 1, l, mid);
}
void dfs(int u) {
  if (fa[u]) mdy(1, 1, n, fa[u] - 1, n, pre[u - 1] - pre[fa[u] - 1]);
  ret = u;
  int d = find(1, 1, n);
  qry(1, 1, n, u, d, -inf);
  ans = max(ans, ret - u + 1);
  for (int t = head[u]; t; t = e[t].nxt) dfs(e[t].r);
  if (fa[u]) mdy(1, 1, n, fa[u] - 1, n, -pre[u - 1] + pre[fa[u] - 1]);
}
int main() {
  ans = 1;
  scanf("%d%d", &n, &K);
  for (int i = 1; i <= n - 1; ++i) scanf("%d", &w[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &g[i]);
  for (int i = 1; i <= n; ++i)
    pre[i] = pre[i - 1] + g[i] - w[i], suf[i] = suf[i - 1] + g[i] - w[i - 1];
  for (int i = n - 1; i >= 1; --i) {
    while (tp && pre[sta[tp]] >= pre[i - 1]) tp--;
    if (g[i] < w[i])
      fa[i] = i + 1;
    else if (!tp)
      fa[i] = 0;
    else
      fa[i] = sta[tp] + 1 > n ? 0 : sta[tp] + 1;
    sta[++tp] = i;
    if (fa[i]) addedge(fa[i], i);
  }
  build(1, 1, n);
  for (int i = 1; i <= n; ++i)
    if (!fa[i]) dfs(i);
  printf("%d", ans);
}