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;
struct segtree {
  long long int seg[1024 * 128 * 2];
  int mum;
  void init(int n) {
    mum = 1;
    while (mum < n) mum <<= 1;
    for (int i = 0; i < mum * 2; i++) seg[i] = 100000000000000000LL;
  }
  void ins(int k, long long int x) {
    k += mum - 1;
    seg[k] = x;
    while (k > 0) {
      k = (k - 1) / 2;
      seg[k] = min(seg[k * 2 + 1], seg[k * 2 + 2]);
    }
  }
  long long int get(int a, int b, int k, int l, int r) {
    if (b <= l || r <= a) return 100000000000000000LL;
    if (a <= l && r <= b)
      return seg[k];
    else {
      long long int vl = get(a, b, k * 2 + 1, l, (l + r) / 2);
      long long int vr = get(a, b, k * 2 + 2, (l + r) / 2, r);
      return min(vl, vr);
    }
  }
  long long int get(int a, int b) { return get(a, b, 0, 0, mum); }
  int right(int a, int b, int k, int l, int r, long long int lim) {
    if (b <= l || r <= a) return -1;
    if (a <= l && r <= b) {
      if (seg[k] > lim) return -1;
      if (l + 1 == r) return l;
      if (seg[k * 2 + 2] <= lim)
        return right(a, b, k * 2 + 2, (l + r) / 2, r, lim);
      return right(a, b, k * 2 + 1, l, (l + r) / 2, lim);
    } else {
      int vr = right(a, b, k * 2 + 2, (l + r) / 2, r, lim);
      if (vr != -1) return vr;
      return right(a, b, k * 2 + 1, l, (l + r) / 2, lim);
    }
  }
  int right(long long int lim, int p) {
    if (p == 0) return -1;
    return right(0, p, 0, 0, mum, lim);
  }
};
segtree seg, seg2;
vector<int> vec[100005];
int W[100005], G[100005];
long long int sum[100005], sum2[100005];
long long int pl[100005], mn[100005];
long long int score2[100005];
long long int dep[100005];
int nxt[100005], to[100005];
int vertex[100005];
pair<long long int, int> pos[100005];
long long int memo[100005];
int n;
long long int k;
int ans;
int sz;
void dfs(int v) {
  seg2.ins(sz, min(mn[v], score2[v]) + dep[v]);
  vertex[sz] = v;
  memo[sz++] = dep[v];
  int p = lower_bound(memo, memo + sz, dep[v] - k) - memo;
  seg2.ins(p, mn[vertex[p]] + dep[vertex[p]]);
  int last = p == 0 ? n + 1 : vertex[p - 1];
  long long int q = seg2.get(p, sz);
  to[v] = seg.right(q + k - dep[v], last);
  seg2.ins(p, min(mn[vertex[p]], score2[vertex[p]]) + dep[vertex[p]]);
  ans = max(ans, to[v] - v + 1);
  for (int i = 0; i < vec[v].size(); i++) dfs(vec[v][i]);
  sz--;
  seg2.ins(sz, 100000000000000000LL);
}
int main() {
  scanf("%d %I64d", &n, &k);
  n--;
  for (int i = 0; i < n; i++) scanf("%d", &W[i]);
  for (int i = 0; i <= n; i++) scanf("%d", &G[i]);
  seg.init(n + 2);
  for (int i = 0; i <= n; i++) {
    if (i == 0)
      sum[i] = -G[0];
    else
      sum[i] = sum[i - 1] + W[i - 1] - G[i];
    seg.ins(i, sum[i]);
  }
  for (int i = n; i >= 0; i--) {
    if (i == n)
      sum2[i] = -G[n];
    else
      sum2[i] = sum2[i + 1] + W[i] - G[i];
  }
  int sz = 0;
  for (int i = n; i >= 0; i--) {
    while (sz > 0 && pos[sz - 1].first >= sum2[i]) sz--;
    if (sz == 0) {
      nxt[i] = n + 1;
      pl[i] = dep[i] = 0;
    } else {
      nxt[i] = pos[sz - 1].second;
      pl[i] = sum2[i] - pos[sz - 1].first;
      dep[i] = pl[i] + dep[nxt[i]];
      vec[nxt[i]].push_back(i);
    }
    mn[i] = seg.get(i, nxt[i]);
    score2[i] = sum[nxt[i] - 1] - pl[i];
    pos[sz++] = pair<long long int, int>(sum2[i], i);
  }
  seg2.init(n + 3);
  ans = 0;
  for (int i = 0; i <= n; i++) {
    if (nxt[i] == n + 1) {
      sz = 0;
      dfs(i);
    }
  }
  printf("%d\n", ans);
  return 0;
}