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 MX = 100005;
const long long oo = 12312312312312312;
template <typename T>
void cmax(T &x, const T &y) {
  if (y > x) x = y;
}
template <typename T>
void read(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') f = 1, c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  if (f) x = -x;
}
int n, k;
long long dis[MX], gas[MX];
long long pre[MX], suf[MX];
struct NODE {
  long long mx_suf;
  long long mn_p;
  long long l_to_r;
  long long add;
  void tag(long long x) {
    mx_suf += x;
    l_to_r += x;
    add += x;
  }
};
struct SEGT {
  NODE tre[MX * 4];
  void psd(int a, int l, int r) {
    if (l != r && tre[a].add) {
      tre[(a << 1)].tag(tre[a].add);
      tre[(a << 1 | 1)].tag(tre[a].add);
      tre[a].add = 0;
    }
  }
  long long calc(int a, int l, int r, long long out) {
    if (l == r) return tre[a].mn_p + out;
    psd(a, l, r);
    if (tre[(a << 1)].mx_suf <= out)
      return min(out + tre[(a << 1)].mn_p,
                 calc((a << 1 | 1), ((l + r) / 2) + 1, r, out));
    else
      return min(tre[a].l_to_r, calc((a << 1), l, ((l + r) / 2), out));
  }
  void upd(int a, int l, int r) {
    tre[a].mx_suf = max(tre[(a << 1)].mx_suf, tre[(a << 1 | 1)].mx_suf);
    tre[a].l_to_r =
        calc((a << 1 | 1), ((l + r) / 2) + 1, r, tre[(a << 1)].mx_suf);
  }
  void mdf(int a, int l, int r, int ql, int qr, long long x) {
    if (ql <= l && r <= qr)
      tre[a].tag(x);
    else if (ql > r || qr < l)
      return;
    else
      psd(a, l, r), mdf((a << 1), l, ((l + r) / 2), ql, qr, x),
          mdf((a << 1 | 1), ((l + r) / 2) + 1, r, ql, qr, x), upd(a, l, r);
  }
  int qur(int a, int l, int r, long long out) {
    if (l == r) return ((out + tre[a].mn_p) <= k) ? l : -1;
    psd(a, l, r);
    if (tre[(a << 1)].mx_suf >= out) {
      if (tre[a].l_to_r <= k)
        return qur((a << 1 | 1), ((l + r) / 2) + 1, r, tre[(a << 1)].mx_suf);
      else
        return qur((a << 1), l, ((l + r) / 2), out);
    } else
      return max(solve((a << 1), l, ((l + r) / 2), out),
                 qur((a << 1 | 1), ((l + r) / 2) + 1, r, out));
  }
  int solve(int a, int l, int r, long long out) {
    if (l == r) return ((out + tre[a].mn_p) <= k) ? l : -1;
    psd(a, l, r);
    if (out + tre[(a << 1 | 1)].mn_p <= k)
      return solve((a << 1 | 1), ((l + r) / 2) + 1, r, out);
    else
      return solve((a << 1), l, ((l + r) / 2), out);
  }
  void build(int a, int l, int r) {
    if (l == r) {
      tre[a].mn_p = -suf[l];
      tre[a].mx_suf = suf[l];
    } else {
      build((a << 1), l, ((l + r) / 2));
      build((a << 1 | 1), ((l + r) / 2) + 1, r);
      upd(a, l, r);
      tre[a].mn_p = min(tre[(a << 1)].mn_p, tre[(a << 1 | 1)].mn_p);
    }
  }
} T;
void input() {
  read(n), read(k);
  dis[n] = +oo;
  for (int i = 1; i < n; i++) read(dis[i]);
  for (int i = 1; i <= n; i++) read(gas[i]);
  for (int i = 1; i <= n; i++) pre[i] = pre[i - 1] + gas[i] - dis[i];
  for (int i = 1; i <= n; i++) suf[i] = suf[i - 1] + gas[i] - dis[i - 1];
}
int nxt[MX];
vector<int> son[MX];
int stk[MX], top;
int ans;
void dfs(int x) {
  stk[++top] = x;
  if (x != n + 1) {
    int l = 1, r = top, mid, ret = 1;
    while (l < r) {
      mid = (l + r) / 2;
      if (pre[x - 1] - pre[stk[mid] - 1] <= k)
        ret = r = mid;
      else
        ret = l = mid + 1;
    }
    T.mdf(1, 1, n, 1, x - 1, -oo);
    T.mdf(1, 1, n, stk[ret - 1], n, +oo);
    cmax(ans, T.qur(1, 1, n, -oo) - x + 1);
    T.mdf(1, 1, n, stk[ret - 1], n, -oo);
    T.mdf(1, 1, n, 1, x - 1, +oo);
  }
  for (auto y : son[x]) {
    T.mdf(1, 1, n, x - 1, n, pre[y - 1] - pre[x - 1]);
    dfs(y);
    T.mdf(1, 1, n, x - 1, n, pre[x - 1] - pre[y - 1]);
  }
  top--;
}
void work() {
  for (int i = n; i >= 1; i--) {
    if (pre[i - 1] > pre[i])
      nxt[i] = i + 1;
    else {
      nxt[i] = nxt[i + 1];
      while (pre[nxt[i] - 1] >= pre[i - 1]) nxt[i] = nxt[nxt[i]];
    }
    son[nxt[i]].push_back(i);
  }
  T.build(1, 1, n);
  dfs(n + 1);
  printf("%d\n", ans);
}
int main() {
  input();
  work();
  return 0;
}