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 int read() {
  int s = 0, t = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') t = -1;
    c = getchar();
  }
  while (isdigit(c)) s = s * 10 + c - 48, c = getchar();
  return s * t;
}
const int N = 1e5 + 5;
const long long inf = 1e15;
inline void Max(int &x, int v) {
  if (v > x) x = v;
}
struct node {
  long long mx, mn, rs, f;
} A[N << 2];
struct edge {
  int to, nxt;
  long long v;
} e[N];
int head[N], cnt = 0;
inline void add(int x, int y, long long v) {
  e[++cnt].to = y, e[cnt].nxt = head[x], e[cnt].v = v, head[x] = cnt;
}
long long p1[N], p2[N], g[N], w[N], f[N], h[N];
int ans = 0, n, K, fa[N], st[N], nxt[N], top = 0;
inline void dfs(int x) {
  for (register int i = head[x]; i; i = e[i].nxt)
    fa[e[i].to] = x, f[e[i].to] = e[i].v, dfs(e[i].to);
}
int ql, qr;
long long d;
inline void Add(int x, long long d) { A[x].mx += d, A[x].rs += d, A[x].f += d; }
inline void down(int k) {
  Add(k << 1, A[k].f), Add(k << 1 | 1, A[k].f), A[k].f = 0;
}
inline long long cal(int l, int r, int k, long long y) {
  if (l == r) return A[k].mn + max(y, A[k].mx - h[l]);
  if (y >= A[k].mx) return A[k].mn + y;
  int mid = (l + r) >> 1;
  down(k);
  if (A[k << 1].mx >= y)
    return min(A[k].rs, cal(l, mid, k << 1, y));
  else
    return min(cal(l, mid, k << 1, y), cal(mid + 1, r, k << 1 | 1, y));
}
inline void up(int k, int l, int r) {
  A[k].mx = max(A[k << 1].mx, A[k << 1 | 1].mx);
  int mid = (l + r) >> 1;
  A[k].rs = cal(mid + 1, r, k << 1 | 1, A[k << 1].mx);
}
inline void build(int l, int r, int k) {
  if (l == r) {
    A[k].mx = p2[l], A[k].mn = -p2[l], A[k].rs = inf;
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid, k << 1), build(mid + 1, r, k << 1 | 1), up(k, l, r);
  A[k].mn = min(A[k << 1].mn, A[k << 1 | 1].mn);
}
inline void upd(int l, int r, int k) {
  if (ql <= l && r <= qr) {
    Add(k, d);
    return;
  }
  int mid = (l + r) >> 1;
  down(k);
  if (ql <= mid) upd(l, mid, k << 1);
  if (qr > mid) upd(mid + 1, r, k << 1 | 1);
  up(k, l, r);
}
inline long long Q(int l, int r, int k) {
  if (ql > qr || qr < l || r < ql) return -inf;
  if (ql <= l && r <= qr) return A[k].mx;
  int mid = (l + r) >> 1;
  down(k);
  if (qr <= mid) return Q(l, mid, k << 1);
  if (ql > mid) return Q(mid + 1, r, k << 1 | 1);
  return max(Q(l, mid, k << 1), Q(mid + 1, r, k << 1 | 1));
}
inline int query(int l, int r, int k, long long y) {
  int mid = (l + r) >> 1;
  if (ql <= l && r <= qr) {
    if (cal(l, r, k, y) > K) return 0;
    if (l == r) return r;
    down(k);
    int t = query(mid + 1, r, k << 1 | 1, max(y, A[k << 1].mx));
    if (t) return t;
    return query(l, mid, k << 1, y);
  } else {
    down(k);
    if (qr > mid) {
      int t = query(mid + 1, r, k << 1 | 1, max(y, Q(l, mid, k << 1)));
      if (t) return t;
    }
    if (ql <= mid) {
      return query(l, mid, k << 1, y);
    }
  }
}
inline void solve(int x) {
  if (f[x]) ql = fa[x] - 1, qr = n, d = f[x], upd(1, n, 1), h[ql] += d;
  if (x != n + 1) {
    ql = x, qr = n;
    Max(ans, query(1, n, 1, -inf) - x + 1);
  }
  for (register int i = head[x]; i; i = e[i].nxt) solve(e[i].to);
  if (f[x]) ql = fa[x] - 1, qr = n, d = -f[x], upd(1, n, 1), h[ql] += d;
}
int main() {
  n = read(), K = read();
  for (register int i = 1; i <= n - 1; i++) w[i] = read();
  w[n] = -inf;
  for (register int i = 1; i <= n; i++) g[i] = read();
  for (register int i = 1; i <= n; i++) p1[i] = p1[i - 1] + g[i] - w[i];
  for (register int i = 1; i <= n; i++) p2[i] = p2[i - 1] + g[i] - w[i - 1];
  st[top = 1] = 0;
  for (register int i = 1; i <= n - 1; i++) {
    while (top && p1[i] < p1[st[top]])
      add(i + 1, st[top--] + 1, p1[st[top]] - p1[i]);
    st[++top] = i;
  }
  for (register int i = 1; i <= top; i++) add(n + 1, st[i] + 1, 0);
  dfs(n + 1);
  fa[n + 1] = n + 1;
  build(1, n, 1);
  solve(n + 1);
  cout << ans << endl;
  return 0;
}