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 int RLEN = 1 << 20 | 1;
inline char gc() {
  static char ibuf[RLEN], *ib, *ob;
  (ib == ob) && (ob = (ib = ibuf) + fread(ibuf, 1, RLEN, stdin));
  return (ib == ob) ? EOF : *ib++;
}
inline int read() {
  char ch = gc();
  int res = 0;
  bool f = 1;
  while (!isdigit(ch)) f ^= ch == '-', ch = gc();
  while (isdigit(ch)) res = (res + (res << 2) << 1) + (ch ^ 48), ch = gc();
  return f ? res : -res;
}
inline long long readll() {
  char ch = gc();
  long long res = 0;
  bool f = 1;
  while (!isdigit(ch)) f ^= ch == '-', ch = gc();
  while (isdigit(ch)) res = (res + (res << 2) << 1) + (ch ^ 48), ch = gc();
  return f ? res : -res;
}
inline int readstring(char *s) {
  int top = 0;
  char ch = gc();
  while (isspace(ch)) ch = gc();
  while (!isspace(ch) && ch != EOF) s[++top] = ch, ch = gc();
  s[top + 1] = '\0';
  return top;
}
template <typename tp>
inline void chemx(tp &a, tp b) {
  a = max(a, b);
}
template <typename tp>
inline void chemn(tp &a, tp b) {
  a = min(a, b);
}
const int N = 100005;
const long long INF = 1e18;
int n, K, g[N], w[N];
long long a[N], b[N], c[N], d[N];
namespace Seg {
const int N = ::N << 2;
long long tag[N], mxd[N], mx[N];
inline void pushnow(int u, long long k) { tag[u] += k, mx[u] += k; }
inline void pushdown(int u) {
  if (!tag[u]) return;
  pushnow((u << 1), tag[u]);
  pushnow(((u << 1) | 1), tag[u]);
  tag[u] = 0;
}
inline void pushup(int u) { mx[u] = max(mx[(u << 1)], mx[((u << 1) | 1)]); }
void build(int u, int l, int r) {
  mx[u] = mxd[u] = -INF;
  if (l == r) {
    return;
  }
  build((u << 1), l, ((l + r) >> 1)),
      build(((u << 1) | 1), ((l + r) >> 1) + 1, r);
}
int st, des, p;
long long k;
void insert(int u, int l, int r) {
  if (l == r) {
    mx[u] = mxd[u] = k;
    return;
  }
  pushdown(u);
  if (p <= ((l + r) >> 1))
    insert((u << 1), l, ((l + r) >> 1));
  else
    insert(((u << 1) | 1), ((l + r) >> 1) + 1, r);
  pushup(u);
  mxd[u] = max(mxd[(u << 1)], mxd[((u << 1) | 1)]);
}
void upd(int u, int l, int r) {
  if (st <= l && r <= des) return pushnow(u, k);
  pushdown(u);
  if (st <= ((l + r) >> 1)) upd((u << 1), l, ((l + r) >> 1));
  if (((l + r) >> 1) < des) upd(((u << 1) | 1), ((l + r) >> 1) + 1, r);
  pushup(u);
}
int query(int u, int l, int r, long long premx) {
  if (l == r) return l;
  pushdown(u);
  if (des <= ((l + r) >> 1)) return query((u << 1), l, ((l + r) >> 1), premx);
  if (((l + r) >> 1) < st)
    return query(((u << 1) | 1), ((l + r) >> 1) + 1, r, premx);
  if (max(mx[(u << 1)], premx) <= mxd[((u << 1) | 1)] + K)
    return query(((u << 1) | 1), ((l + r) >> 1) + 1, r,
                 max(premx, mx[(u << 1)]));
  return query((u << 1), l, ((l + r) >> 1), premx);
}
void write(int u, int l, int r) {
  if (l == r) {
    cout << mx[u] << " ";
    return;
  }
  pushdown(u);
  write((u << 1), l, ((l + r) >> 1)),
      write(((u << 1) | 1), ((l + r) >> 1) + 1, r);
}
inline void insert(int _p, long long _k) {
  p = _p, k = _k;
  insert(1, 1, n);
}
inline void update(int _st, int _des, long long _k) {
  st = _st, des = _des, k = _k;
  upd(1, 1, n);
}
inline int query(int _st, int _des) {
  st = _st, des = _des;
  return query(1, 1, n, -INF);
}
}  // namespace Seg
int stk[N], top;
int main() {
  n = read(), K = read();
  for (int i = 1; i < n; i++) w[i] = read(), b[i] = b[i - 1] + w[i];
  for (int i = 1; i <= n; i++) g[i] = read(), a[i] = a[i - 1] + g[i];
  for (int i = 1; i <= n; i++)
    c[i] = a[i - 1] - b[i - 1], d[i] = a[i] - b[i - 1];
  Seg::build(1, 1, n);
  int ans = 0;
  for (int i = n; i; i--) {
    while (top > 0 && c[stk[top]] >= c[i]) {
      if (top > 1)
        Seg::update(stk[top - 1] - 1, n, -(c[stk[top]] - c[stk[top - 1]]));
      top--;
    }
    stk[++top] = i, Seg::insert(i, d[i]);
    if (top > 1)
      Seg::update(stk[top - 1] - 1, n, c[stk[top]] - c[stk[top - 1]]);
    int l = 1, r = top, res = -1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (c[i] - c[stk[mid]] > K)
        res = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    if (res == -1)
      res = n;
    else
      res = stk[res] - 1;
    chemx(ans, Seg::query(i, res) - i + 1);
  }
  cout << ans << '\n';
}