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>
struct edge {
  int v, w;
  edge *nt;
} G[100007], *e[100007], *v = G;
int n, k, MAPLE = 1, lm, rm, fin, ri[100007], pos, d[100007], a[100007], wt,
          ss[19];
char fl[1 << 23], *A = fl;
long long fint, w[100007], s[100007], mpos;
bool u[100007];
struct node {
  long long mx, mi, h, mp, mc;
  node *l, *r;
  int fg;
  int le, ri, mid;
  long long min(long long a, long long b) { return a > b ? b : a; }
  void pd(long long tmp) { mx += tmp, mi += tmp, h += tmp, mc += tmp; }
  long long dfs(long long tmp) {
    if (tmp > mx || le == ri) return tmp + mp;
    if (h) l->pd(h), r->pd(h), h = 0;
    if (l->mx < tmp)
      return min(tmp + l->mp, r->dfs(tmp));
    else
      return min(l->dfs(tmp), mi);
  }
  int vfs() {
    if (le == ri) return le;
    if (h) l->pd(h), r->pd(h), h = 0;
    return r->mc <= k ? r->vfs() : l->vfs();
  }
  void query() {
    if (lm <= le && ri <= rm) {
      if (dfs(fint) <= k) pos = fg, mpos = fint;
      if (mx > fint) fint = mx;
      return;
    }
    if (h) l->pd(h), r->pd(h), h = 0;
    if (lm <= mid) l->query();
    if (mid < rm) r->query();
  }
  void fix() {
    mx = l->mx > r->mx ? l->mx : r->mx, mc = l->mc, mi = r->dfs(l->mx);
  }
  void alter() {
    if (lm <= le) return (void)pd(fin);
    if (h) l->pd(h), r->pd(h), h = 0;
    if (lm <= mid) l->alter();
    r->alter();
    fix();
  }
  int qfs(long long fint) {
    if (le == ri) return le;
    if (h) l->pd(h), r->pd(h), h = 0;
    if (r->dfs(l->mx > fint ? l->mx : fint) <= k)
      return r->qfs(l->mx > fint ? l->mx : fint);
    return l->qfs(fint);
  }
} t[262144], *root, *cnt = t;
void read(int &x) {
  char c;
  for (x = 0; '0' > (c = *A++) || c > '9';)
    ;
  while ('0' <= c && c <= '9') x = (x << 3) + (x << 1) + c - 48, (c = *A++);
}
void print(int x) {
  if (!x)
    putchar(48);
  else {
    for (wt = 0; x; ss[++wt] = x % 10, x /= 10)
      ;
    for (; wt; putchar(ss[wt--] + 48))
      ;
  }
}
void build(node *&x, int le, int ri) {
  if (x = ++cnt, x->fg = cnt - t, x->le = le, x->ri = ri, le == ri)
    return (void)(s[le] = s[le - 1] + a[le] - d[le - 1], x->mx = s[le],
                  x->mp = -s[le]);
  int mid = (le + ri) >> 1;
  x->mid = mid, build(x->l, le, mid), build(x->r, mid + 1, ri), x->fix();
  x->mp = x->l->mp < x->r->mp ? x->l->mp : x->r->mp;
}
void dfs(int x) {
  int tmp = root->vfs();
  if ((++tmp) > n) tmp = n;
  if (x != tmp && (fint = s[x], lm = x + 1, rm = tmp, pos = 0, root->query(),
                   pos && (tmp = t[pos].qfs(mpos), tmp - x + 1 > MAPLE)))
    MAPLE = tmp - x + 1;
  for (edge *v = e[x]; v; lm = x - 1, fin = v->w, root->alter(), s[lm] += fin,
            dfs(v->v), lm = x - 1, fin = -v->w, root->alter(), s[lm] += fin,
            v = v->nt)
    ;
}
int main() {
  int i, j;
  long long tmp;
  for (*(fl + fread(fl, 1, 1 << 23, stdin)) = EOF, read(n), read(k), i = 1;
       i < n; read(d[i++]))
    ;
  for (i = 1; i <= n; read(a[i]), w[i] = w[i - 1] + a[i] - d[i], i++)
    ;
  for (build(root, 1, n), w[n + 1] = -1ll << 51, u[n] = true, ri[n] = n + 1,
                                i = n - 1;
       ~i; i--) {
    for (j = i + 1; w[j] >= w[i]; j = ri[j])
      ;
    ri[i] = j;
    if (ri[i] < n)
      (++v)->v = i + 1, v->nt = e[ri[i] + 1], e[ri[i] + 1] = v,
      v->w = w[i] - w[ri[i]];
    else
      u[i + 1] = true;
  }
  for (i = 1; i <= n; i++)
    if (u[i]) dfs(i);
  print(MAPLE);
}