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;
long long pre[100010], suf[100010];
struct Tree {
  long long mnsuf, addsuf;
  long long mnp, addp;
  long long res;
} T[400010];
void pushdown(int root) {
  int lch = root << 1;
  int rch = root << 1 | 1;
  T[lch].mnsuf += T[root].addsuf;
  T[rch].mnsuf += T[root].addsuf;
  T[lch].mnp += T[root].addsuf;
  T[rch].mnp += T[root].addsuf;
  T[lch].addsuf += T[root].addsuf;
  T[rch].addsuf += T[root].addsuf;
  T[lch].mnp += T[root].addp;
  T[rch].mnp += T[root].addp;
  T[lch].addp += T[root].addp;
  T[rch].addp += T[root].addp;
  T[lch].res += T[root].addp;
  T[rch].res += T[root].addp;
  T[root].addsuf = 0;
  T[root].addp = 0;
  return;
}
long long calc(int root, int l, int r, long long val) {
  if (l == r) return T[root].mnp - min(val, T[root].mnsuf);
  pushdown(root);
  int lch = root << 1;
  int rch = root << 1 | 1;
  int mid = (l + r) >> 1;
  long long ans1, ans2;
  if (val < T[lch].mnsuf) {
    ans1 = T[lch].mnp - val;
    ans2 = calc(rch, mid + 1, r, val);
  } else {
    ans1 = calc(lch, l, mid, val);
    ans2 = T[root].res;
  }
  return min(ans1, ans2);
}
void update(int root, int l, int r) {
  int lch = root << 1;
  int rch = root << 1 | 1;
  int mid = (l + r) >> 1;
  T[root].mnsuf = min(T[lch].mnsuf, T[rch].mnsuf);
  T[root].mnp = min(T[lch].mnp, T[rch].mnp);
  T[root].res = calc(rch, mid + 1, r, T[lch].mnsuf);
  return;
}
void build(int root, int l, int r) {
  if (l == r) {
    T[root].mnsuf = suf[l];
    T[root].mnp = suf[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(root << 1, l, mid);
  build(root << 1 | 1, mid + 1, r);
  update(root, l, r);
  return;
}
void change_suf(int root, int l, int r, int x, int y, long long add) {
  if (x > y) return;
  if (x <= l && r <= y) {
    T[root].mnsuf += add;
    T[root].mnp += add;
    T[root].addsuf += add;
    return;
  }
  pushdown(root);
  int mid = (l + r) >> 1;
  if (x <= mid) change_suf(root << 1, l, mid, x, y, add);
  if (y > mid) change_suf(root << 1 | 1, mid + 1, r, x, y, add);
  update(root, l, r);
  return;
}
void change_p(int root, int l, int r, int x, int y, long long add) {
  if (x > y) return;
  if (x <= l && r <= y) {
    T[root].mnp += add;
    T[root].addp += add;
    T[root].res += add;
    return;
  }
  pushdown(root);
  int mid = (l + r) >> 1;
  if (x <= mid) change_p(root << 1, l, mid, x, y, add);
  if (y > mid) change_p(root << 1 | 1, mid + 1, r, x, y, add);
  update(root, l, r);
  return;
}
long long query(int root, int l, int r, int x, int y) {
  if (x <= l && r <= y) return T[root].mnsuf;
  int mid = (l + r) >> 1;
  long long ans = 1e18;
  pushdown(root);
  if (x <= mid) ans = min(ans, query(root << 1, l, mid, x, y));
  if (y > mid) ans = min(ans, query(root << 1 | 1, mid + 1, r, x, y));
  return ans;
}
int n, k;
int solve(int root, int l, int r, int x, int y, long long val) {
  if (l == r) {
    if (T[root].mnp - min(val, T[root].mnsuf) <= k) return l;
    return 0;
  }
  int mid = (l + r) >> 1;
  pushdown(root);
  if (x <= l && r <= y) {
    if (calc(root << 1 | 1, mid + 1, r, min(val, T[root << 1].mnsuf)) <= k)
      return solve(root << 1 | 1, mid + 1, r, x, y,
                   min(val, T[root << 1].mnsuf));
    if (calc(root << 1, l, mid, val) <= k)
      return solve(root << 1, l, mid, x, y, val);
    return 0;
  }
  if (y <= mid) return solve(root << 1, l, mid, x, y, val);
  if (x > mid) return solve(root << 1 | 1, mid + 1, r, x, y, val);
  long long mns = query(root << 1, l, mid, x, y);
  int ans = solve(root << 1 | 1, mid + 1, r, x, y, min(val, mns));
  if (!ans) ans = solve(root << 1, l, mid, x, y, val);
  return ans;
}
struct Edge {
  int v, nxt;
} e[100010];
int tot;
int first[100010];
void adde(int u, int v) {
  e[++tot] = (Edge){v, first[u]};
  first[u] = tot;
  return;
}
int nxt[100010];
int w[100010];
int g[100010];
int sta[100010], head;
void init() {
  scanf("%d %d", &n, &k);
  for (int i = 1; i < n; i++) scanf("%d", &w[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &g[i]);
  for (int i = 2; i <= n; i++) pre[i] = pre[i - 1] - w[i - 1] + g[i - 1];
  for (int i = n - 1; i >= 1; i--) suf[i] = suf[i + 1] - w[i] + g[i + 1];
  pre[n + 1] = -1e18;
  nxt[n + 1] = n + 1;
  head = 1;
  sta[head] = n + 1;
  for (int i = n; i >= 1; i--) {
    while (pre[sta[head]] >= pre[i]) head--;
    nxt[i] = sta[head];
    sta[++head] = i;
    adde(nxt[i], i);
  }
  build(1, 1, n);
  head = 0;
  return;
}
int final_ans;
int tmp[100010];
void dfs(int u) {
  sta[++head] = u;
  if (nxt[u] <= n) {
    change_suf(1, 1, n, 1, nxt[u] - 2, pre[u] - pre[nxt[u]]);
    change_p(1, 1, n, nxt[u] - 1, n, pre[u] - pre[nxt[u]]);
  }
  tmp[u] = tmp[nxt[u]];
  if (!tmp[u]) tmp[u] = 1;
  while (pre[u] - pre[sta[tmp[u]]] > k) tmp[u]++;
  if (u <= n) {
    change_suf(1, 1, n, sta[tmp[u] - 1] - 1, sta[tmp[u] - 1] - 1,
               pre[sta[tmp[u]]] - pre[sta[tmp[u] - 1]]);
    change_p(1, 1, n, sta[tmp[u] - 1] - 1, sta[tmp[u] - 1] - 1,
             pre[sta[tmp[u] - 1]] - pre[sta[tmp[u]]]);
    final_ans = max(final_ans, solve(1, 1, n, u, n, 1e18) - u + 1);
    change_p(1, 1, n, sta[tmp[u] - 1] - 1, sta[tmp[u] - 1] - 1,
             pre[sta[tmp[u]]] - pre[sta[tmp[u] - 1]]);
    change_suf(1, 1, n, sta[tmp[u] - 1] - 1, sta[tmp[u] - 1] - 1,
               pre[sta[tmp[u] - 1]] - pre[sta[tmp[u]]]);
  }
  for (int i = first[u]; i; i = e[i].nxt) dfs(e[i].v);
  if (nxt[u] <= n) {
    change_suf(1, 1, n, 1, nxt[u] - 2, pre[nxt[u]] - pre[u]);
    change_p(1, 1, n, nxt[u] - 1, n, pre[nxt[u]] - pre[u]);
  }
  head--;
  return;
}
int main() {
  init();
  dfs(n + 1);
  printf("%d\n", final_ans);
}