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 long long oo = 1000000000000000000ll;
const int N = 100100;
int i, j, k, n, m, K, ch, En, ans, nn;
int nt[N], h[N];
long long t, g[N], w[N], need[N], pre[N], suf[N], cost[N], s[N];
struct dd {
  int L, R, k;
} A[N];
struct edge {
  int s, n;
} E[N];
struct cc {
  int pos;
  long long val;
};
struct tree {
  cc ind1, ind2;
  long long ad, cost, mx;
} T[N << 2];
void R(int &x) {
  x = 0;
  ch = getchar();
  while (ch < '0' || '9' < ch) ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
}
void R(long long &x) {
  x = 0;
  ch = getchar();
  while (ch < '0' || '9' < ch) ch = getchar();
  while ('0' <= ch && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
}
void E_add(int x, int F) {
  E[++En].s = x;
  E[En].n = h[F];
  h[F] = En;
}
cc min(cc x, cc y) {
  if (x.val < y.val) return x;
  return y;
}
int max(int x, int y) {
  if (x > y) return x;
  return y;
}
long long max(long long x, long long y) {
  if (x > y) return x;
  return y;
}
void down(int k) {
  if (T[k].ad) {
    T[k << 1].ad += T[k].ad;
    T[k << 1].cost += T[k].ad;
    T[k << 1].mx += T[k].ad;
    T[k << 1 | 1].ad += T[k].ad;
    T[k << 1 | 1].cost += T[k].ad;
    T[k << 1 | 1].mx += T[k].ad;
    T[k].ad = 0;
  }
}
cc calc(int L, int R, int k) {
  if (L == R) {
    cc a;
    a.pos = L;
    if (t == -oo)
      a.val = oo;
    else
      a.val = t + T[k].ind1.val;
    return a;
  }
  int mid = (L + R) >> 1;
  if (t <= T[k << 1].mx) return min(calc(L, mid, k << 1), T[k].ind2);
  cc a;
  a = T[k << 1].ind1;
  a.val += t;
  return min(a, calc(mid + 1, R, k << 1 | 1));
}
void up(int L, int R, int k) {
  T[k].cost = T[k << 1].cost;
  T[k].ind1 = min(T[k << 1].ind1, T[k << 1].ind1);
  T[k].mx = max(T[k << 1].mx, T[k << 1 | 1].mx);
  t = T[k << 1].mx;
  int mid = (L + R) >> 1;
  T[k].ind2 = calc(mid + 1, R, k << 1 | 1);
}
void T_build(int L, int R, int k) {
  if (L == R) {
    T[k].ind1.pos = L;
    T[k].ind1.val = -suf[L];
    T[k].mx = suf[L];
    return;
  }
  int mid = (L + R) >> 1;
  T_build(L, mid, k << 1);
  T_build(mid + 1, R, k << 1 | 1);
  up(L, R, k);
}
void T_add(int L, int R, int l, int r, long long ad, int k) {
  if (L == l && R == r) {
    T[k].ind2.val += ad;
    T[k].ad += ad;
    T[k].cost += ad;
    T[k].mx += ad;
    return;
  }
  int mid = (L + R) >> 1;
  down(k);
  if (r <= mid)
    T_add(L, mid, l, r, ad, k << 1);
  else {
    if (l > mid)
      T_add(mid + 1, R, l, r, ad, k << 1 | 1);
    else
      T_add(L, mid, l, mid, ad, k << 1),
          T_add(mid + 1, R, mid + 1, r, ad, k << 1 | 1);
  }
  up(L, R, k);
}
int T_find(int L, int R, int k) {
  if (L == R) return L;
  int mid = (L + R) >> 1;
  down(k);
  if (T[k << 1 | 1].cost <= K) return T_find(mid + 1, R, k << 1 | 1);
  return T_find(L, mid, k << 1);
}
void T_query(int L, int R, int l, int r, int k) {
  if (L == l && R == r) {
    A[++nn].k = k;
    A[nn].L = L;
    A[nn].R = R;
    return;
  }
  int mid = (L + R) >> 1;
  down(k);
  if (r <= mid)
    T_query(L, mid, l, r, k << 1);
  else {
    if (l > mid)
      T_query(mid + 1, R, l, r, k << 1 | 1);
    else
      T_query(L, mid, l, mid, k << 1),
          T_query(mid + 1, R, mid + 1, r, k << 1 | 1);
  }
}
int T_right(int L, int R, int k) {
  if (L == R) return L;
  down(k);
  long long tt = t;
  int mid = (L + R) >> 1;
  if (T[k << 1].mx > t) t = T[k << 1].mx;
  if (calc(mid + 1, R, k << 1 | 1).val <= K)
    return T_right(mid + 1, R, k << 1 | 1);
  t = tt;
  return T_right(L, mid, k << 1);
}
int get_ans() {
  int i;
  s[0] = -oo;
  for (i = 1; i <= nn; i++) s[i] = max(s[i - 1], T[A[i].k].mx);
  for (i = nn; i; i--) {
    t = s[i - 1];
    if (calc(A[i].L, A[i].R, A[i].k).val <= K)
      return T_right(A[i].L, A[i].R, A[i].k);
  }
  return 0;
}
void dfs(int x) {
  if (nt[x] != n + 1) T_add(1, n, nt[x] - 1, n, need[x], 1);
  int tmp;
  if (T[1].cost > K)
    tmp = 0;
  else
    tmp = T_find(1, n, 1);
  if (tmp == n) tmp = n - 1;
  nn = 0;
  T_query(1, n, x, tmp + 1, 1);
  tmp = get_ans();
  if (tmp - x + 1 > ans) ans = tmp - x + 1;
  for (int k = h[x]; k; k = E[k].n) dfs(E[k].s);
  if (nt[x] != n + 1) T_add(1, n, nt[x] - 1, n, -need[x], 1);
}
int main() {
  R(n);
  R(K);
  ans = 1;
  for (i = 1; i < n; i++) R(w[i]);
  for (i = 1; i <= n; i++) R(g[i]);
  for (i = 1; i < n; i++) pre[i] = pre[i - 1] + g[i] - w[i];
  for (i = 2; i <= n; i++) suf[i] = suf[i - 1] + g[i] - w[i - 1];
  nt[n] = n + 1;
  for (i = n - 1; i; i--) {
    if (pre[i] - pre[i - 1] < 0)
      nt[i] = i + 1;
    else {
      k = nt[i + 1];
      while (k <= n && pre[k - 1] - pre[i - 1] >= 0) k = nt[k];
      nt[i] = k;
    }
    if (nt[i] != n + 1) {
      need[i] = pre[i - 1] - pre[nt[i] - 1];
      E_add(i, nt[i]);
    }
  }
  T_build(1, n, 1);
  for (i = 1; i <= n; i++)
    if (nt[i] == n + 1) dfs(i);
  printf("%d\n", ans);
}