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;
inline long long read() {
  long long s = 0, t = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') t = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return s * t;
}
const int N = 1e5 + 5;
const long long inf = 0x3f3f3f3f3f3f3f3f;
int n, top, Len = 1, s[N], nxt[N];
long long K, w[N], g[N], pre[N], suf[N];
vector<int> G[N];
long long a[N << 2], b[N << 2], d[N << 2], res[N << 2];
void Init(int x, long long t) { b[x] += t, res[x] -= t, d[x] += t; }
void Pushdown(int x) {
  if (!d[x]) return;
  Init(x << 1, d[x]), Init(x << 1 | 1, d[x]), d[x] = 0;
}
long long Calc(int x, int l, int r, long long t) {
  if (l == r) return a[x] - t;
  int mid = (l + r) >> 1;
  Pushdown(x);
  if (b[x << 1] < t) return min(Calc(x << 1, l, mid, t), res[x]);
  return min(a[x << 1] - t, Calc(x << 1 | 1, mid + 1, r, t));
}
void Build(int x, int l, int r) {
  if (l == r) {
    a[x] = b[x] = suf[l];
    return;
  }
  int mid = (l + r) >> 1;
  Build(x << 1, l, mid), Build(x << 1 | 1, mid + 1, r);
  a[x] = min(a[x << 1], a[x << 1 | 1]), b[x] = min(b[x << 1], b[x << 1 | 1]);
  res[x] = Calc(x << 1 | 1, mid + 1, r, b[x << 1]);
}
void Upd(int x, int l, int r, int ql, int qr, long long t) {
  if (ql <= l && r <= qr) {
    Init(x, t);
    return;
  }
  int mid = (l + r) >> 1;
  Pushdown(x);
  if (ql <= mid) Upd(x << 1, l, mid, ql, qr, t);
  if (qr > mid) Upd(x << 1 | 1, mid + 1, r, ql, qr, t);
  b[x] = min(b[x << 1], b[x << 1 | 1]),
  res[x] = Calc(x << 1 | 1, mid + 1, r, b[x << 1]);
}
int Find(int x, int l, int r, long long t) {
  if (l == r) return l;
  int mid = (l + r) >> 1;
  Pushdown(x);
  return a[x << 1 | 1] <= t ? Find(x << 1 | 1, mid + 1, r, t)
                            : Find(x << 1, l, mid, t);
}
int Solve(int x, int l, int r, long long &t) {
  if (l == r) {
    int tp = a[x] - t <= K ? l : 0;
    return t = min(t, b[x]), tp;
  }
  int mid = (l + r) >> 1;
  Pushdown(x);
  if (b[x << 1] < t) {
    if (res[x] <= K) return Solve(x << 1 | 1, mid + 1, r, t = b[x << 1]);
    int tp = Solve(x << 1, l, mid, t);
    return t = min(t, b[x]), tp;
  } else {
    int tp = a[x << 1] <= K + t ? Find(x << 1, l, mid, K + t) : 0;
    return max(tp, Solve(x << 1 | 1, mid + 1, r, t));
  }
}
void DFS(int x) {
  s[++top] = x;
  if (nxt[x] <= n) Upd(1, 1, n, nxt[x] - 1, n, pre[x] - pre[nxt[x]]);
  if (x <= n) {
    int l = 2, r = top - 1, res = 1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (pre[s[mid]] - pre[x] > K)
        res = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    int lim = s[res] - 1;
    if (x > 1) Upd(1, 1, n, 1, x - 1, inf);
    Upd(1, 1, n, lim, n, -inf);
    long long tp = inf;
    int pos = Solve(1, 1, n, tp);
    if (x > 1) Upd(1, 1, n, 1, x - 1, -inf);
    Upd(1, 1, n, lim, n, inf);
    Len = max(Len, pos - x + 1);
  }
  for (auto y : G[x]) DFS(y);
  if (nxt[x] <= n) Upd(1, 1, n, nxt[x] - 1, n, pre[nxt[x]] - pre[x]);
  top--;
}
int main() {
  n = read(), K = read();
  for (int i = 1; i < n; i++) w[i] = read();
  for (int i = 1; i <= n; i++) g[i] = read();
  for (int i = 2; i <= n; i++) {
    pre[i] = pre[i - 1] + w[i - 1] - g[i - 1];
    suf[i] = suf[i - 1] + w[i - 1] - g[i];
  }
  for (int i = n; i >= 1; i--) {
    while (top && pre[s[top]] <= pre[i]) top--;
    nxt[i] = top ? s[top] : n + 1, s[++top] = i;
    G[nxt[i]].push_back(i);
  }
  nxt[n + 1] = n + 1, top = 0;
  Build(1, 1, n), DFS(n + 1), printf("%d", Len);
  return 0;
}