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 double eps = 1e-7;
const int N = 200010;
const int M = 200010;
const long long Inf = (1ll << 60);
const long long Fni = -(1ll << 60);
inline int qr() {
  int r = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    r = (r << 1) + (r << 3) + c - '0', c = getchar();
  }
  return r * f;
}
template <typename T>
void debug(T *const tp, int minn, int maxn, char v = ' ', char c = '\n') {
  for (int i = minn; i <= maxn; ++i) cout << tp[i] << v;
  cout << c;
}
int cnt;
int head[N];
struct Edge {
  int to;
  int val;
  int next;
} E[N * 2];
void add_e(int x, int y, int w = 0) {
  E[++cnt].to = y;
  E[cnt].val = w;
  E[cnt].next = head[x];
  head[x] = cnt;
}
int res;
int top;
long long sp[N];
long long ss[N];
int n, m;
int w[N];
int g[N];
int fa[N];
int stk[N];
long long s[N * 3];
long long sa[N * 3];
long long sb[N * 3];
long long tag[N * 3];
void _down(int rt, int l, int r) {
  if (tag[rt]) {
    s[(rt << 1)] -= tag[rt];
    s[(rt << 1 | 1)] -= tag[rt];
    sb[(rt << 1)] += tag[rt];
    sb[(rt << 1 | 1)] += tag[rt];
    tag[(rt << 1)] += tag[rt];
    tag[(rt << 1 | 1)] += tag[rt];
    tag[rt] = 0;
  }
}
long long solve(int rt, int l, int r, long long v) {
  if (l == r) return sa[rt] - v;
  int mid = (l + r) >> 1;
  _down(rt, l, r);
  if (sb[(rt << 1)] < v)
    return min(solve((rt << 1), l, mid, v), s[rt]);
  else
    return min(solve((rt << 1 | 1), mid + 1, r, v), sa[(rt << 1)] - v);
}
void build(int rt, int l, int r) {
  if (l == r) return void(sa[rt] = sb[rt] = ss[l]);
  int mid = (l + r) >> 1;
  build((rt << 1), l, mid);
  build((rt << 1 | 1), mid + 1, r);
  sa[rt] = min(sa[(rt << 1)], sa[(rt << 1 | 1)]);
  sb[rt] = min(sb[(rt << 1)], sb[(rt << 1 | 1)]);
  s[rt] = solve((rt << 1 | 1), mid + 1, r, sb[(rt << 1)]);
}
void update(int rt, int l, int r, int ul, int ur, long long v) {
  if (ul <= l && r <= ur) {
    tag[rt] += v;
    sb[rt] += v;
    s[rt] -= v;
    return;
  }
  _down(rt, l, r);
  int mid = (l + r) >> 1;
  if (ul <= mid) update((rt << 1), l, mid, ul, ur, v);
  if (ur > mid) update((rt << 1 | 1), mid + 1, r, ul, ur, v);
  sb[rt] = min(sb[(rt << 1)], sb[(rt << 1 | 1)]);
  s[rt] = solve((rt << 1 | 1), mid + 1, r, sb[(rt << 1)]);
}
int ask(int rt, int l, int r, long long v) {
  if (l == r) return l;
  int mid = (l + r) >> 1;
  if (sa[(rt << 1 | 1)] > v) return ask((rt << 1), l, mid, v);
  return ask((rt << 1 | 1), mid + 1, r, v);
}
int query(int rt, int l, int r, long long &v) {
  if (l == r) {
    int ret;
    ret = sa[rt] - v <= m ? l : 0;
    v = min(v, sb[rt]);
    return ret;
  }
  int mid = (l + r) >> 1;
  _down(rt, l, r);
  if (sb[(rt << 1)] < v) {
    if (s[rt] <= m) {
      v = sb[(rt << 1)];
      return query((rt << 1 | 1), mid + 1, r, v);
    } else {
      int ret;
      ret = query((rt << 1), l, mid, v);
      v = min(v, sb[rt]);
      return ret;
    }
  } else {
    int ret = 0;
    if (sa[rt] - v <= m) ret = ask((rt << 1), l, mid, m + v);
    return max(ret, query((rt << 1 | 1), mid + 1, r, v));
  }
}
void dfs(int x) {
  stk[++top] = x;
  if (fa[x] <= n) update(1, 1, n, fa[x] - 1, n, -sp[fa[x]] + sp[x]);
  if (x <= n) {
    int l = 2, r = top - 1, ans = 1, mid;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (sp[stk[mid]] - sp[x] > m)
        ans = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    long long tmp = Inf;
    ans = stk[ans] - 1;
    if (x > 1) update(1, 1, n, 1, x - 1, Inf);
    if (ans <= n) update(1, 1, n, ans, n, Fni);
    res = max(res, query(1, 1, n, tmp) - x + 1);
    if (x > 1) update(1, 1, n, 1, x - 1, Fni);
    if (ans <= n) update(1, 1, n, ans, n, Inf);
  }
  for (int k = head[x]; k; k = E[k].next) dfs(E[k].to);
  stk[top--] = 0;
  if (fa[x] <= n) update(1, 1, n, fa[x] - 1, n, sp[fa[x]] - sp[x]);
}
int main() {
  cin >> n >> m;
  w[n] = Inf;
  for (int i = 1; i < n; ++i) w[i] = qr();
  for (int i = 1; i <= n; ++i) g[i] = qr();
  for (int i = 2; i <= n; ++i) {
    sp[i] = sp[i - 1] - g[i - 1] + w[i - 1];
    ss[i] = ss[i - 1] - g[i] + w[i - 1];
  }
  stk[++top] = n + 1;
  sp[n + 1] = Inf;
  fa[n + 1] = n + 1;
  for (int i = n; i >= 1; --i) {
    while (top && sp[stk[top]] <= sp[i]) --top;
    fa[i] = stk[top];
    stk[++top] = i;
  }
  for (int i = 1; i <= n; ++i) add_e(fa[i], i);
  build(1, 1, n);
  top = 0;
  dfs(n + 1);
  cout << res << '\n';
  return 0;
}