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;
template <typename T>
bool cmax(T &a, T b) {
  return (a < b) ? a = b, 1 : 0;
}
template <typename T>
bool cmin(T &a, T b) {
  return (a > b) ? a = b, 1 : 0;
}
template <typename T>
T read() {
  T ans = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') f = -1, ch = getchar();
  while (isdigit(ch))
    ans = (ans << 3) + (ans << 1) + (ch - '0'), ch = getchar();
  return ans * f;
}
template <typename T>
void write(T x, char y) {
  if (x == 0) {
    putchar('0'), putchar(y);
    return;
  }
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  static char wr[20];
  int top = 0;
  for (; x; x /= 10) wr[++top] = x % 10 + '0';
  while (top) putchar(wr[top--]);
  putchar(y);
}
void file() {}
const int N = 1e5 + 5;
int n;
long long K;
long long w[N], g[N];
long long pre[N], suf[N];
void input() {
  n = read<int>(), K = read<long long>();
  for (register int i = (int)(1); i <= (int)(n - 1); ++i) w[i] = read<int>();
  for (register int i = (int)(1); i <= (int)(n); ++i) g[i] = read<int>();
}
int st[N], top;
vector<int> E[N];
int nex[N];
long long lazy[N << 2], mp[N << 2], ms[N << 2], mans[N << 2];
void put_tag(int h, long long val) {
  ms[h] += val, mans[h] += val;
  lazy[h] += val;
}
void push_down(int h) {
  if (!lazy[h]) return;
  put_tag(h << 1, lazy[h]);
  put_tag(h << 1 | 1, lazy[h]);
  lazy[h] = 0;
}
long long cal(int h, int l, int r, long long t) {
  if (l == r) return mp[h] + t;
  push_down(h);
  if (ms[h << 1] >= t)
    return min(cal(h << 1, l, ((l + r) >> 1), t), mans[h]);
  else
    return min(t + mp[h << 1], cal(h << 1 | 1, ((l + r) >> 1) + 1, r, t));
}
void push_up(int h, int l, int r) {
  ms[h] = max(ms[h << 1], ms[h << 1 | 1]);
  mp[h] = min(mp[h << 1], mp[h << 1 | 1]);
  mans[h] = cal(h << 1 | 1, ((l + r) >> 1) + 1, r, ms[h << 1]);
}
void build(int h, int l, int r) {
  if (l == r) {
    ms[h] = suf[l];
    mp[h] = -suf[l];
    return;
  }
  build(h << 1, l, ((l + r) >> 1)), build(h << 1 | 1, ((l + r) >> 1) + 1, r);
  push_up(h, l, r);
}
int solve(int h, int l, int r, long long t) {
  if (l == r) return t + mp[h] <= K ? l : 0;
  push_down(h);
  if (t + mp[h << 1 | 1] <= K)
    return solve(h << 1 | 1, ((l + r) >> 1) + 1, r, t);
  else
    return solve(h << 1, l, ((l + r) >> 1), t);
}
int query(int h, int l, int r, long long t) {
  if (l == r) return t + mp[h] <= K ? l : 0;
  push_down(h);
  if (ms[h << 1] >= t) {
    if (mans[h] <= K)
      return query(h << 1 | 1, ((l + r) >> 1) + 1, r, ms[h << 1]);
    else
      return query(h << 1, l, ((l + r) >> 1), t);
  } else
    return max(solve(h << 1, l, ((l + r) >> 1), t),
               query(h << 1 | 1, ((l + r) >> 1) + 1, r, t));
}
void update(int h, int l, int r, int s, int t, long long val) {
  if (s > t) return;
  if (s <= l && r <= t)
    put_tag(h, val);
  else {
    push_down(h);
    if (s <= ((l + r) >> 1)) update(h << 1, l, ((l + r) >> 1), s, t, val);
    if (((l + r) >> 1) < t)
      update(h << 1 | 1, ((l + r) >> 1) + 1, r, s, t, val);
    push_up(h, l, r);
  }
}
const long long inf = 1e18;
void init() {
  w[n] = inf;
  for (register int i = (int)(1); i <= (int)(n); ++i)
    pre[i] = pre[i - 1] + g[i] - w[i], suf[i] = suf[i - 1] + g[i] - w[i - 1];
  st[0] = n;
  for (register int i = (int)(n - 1); i >= (int)(0); --i) {
    while (top && pre[st[top]] >= pre[i]) top--;
    nex[i + 1] = st[top] + 1;
    E[nex[i + 1]].push_back(i + 1);
    st[++top] = i;
  }
  build(1, 1, n);
}
int Ans;
void dfs(int u) {
  st[++top] = u;
  if (u != n + 1) {
    update(1, 1, n, 1, u - 1, -inf);
    update(1, 1, n, nex[u] - 1, n, pre[u - 1] - pre[nex[u] - 1]);
    int l = 1, r = top, mid, res = -1;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (pre[u - 1] - pre[st[mid] - 1] <= K)
        res = mid, r = mid - 1;
      else
        l = mid + 1;
    }
    assert(~res);
    update(1, 1, n, st[res - 1], n, inf);
    cmax(Ans, query(1, 1, n, -inf) - u + 1);
    update(1, 1, n, st[res - 1], n, -inf);
    update(1, 1, n, 1, u - 1, inf);
  }
  for (int v : E[u]) dfs(v);
  if (u != n + 1) update(1, 1, n, nex[u] - 1, n, pre[nex[u] - 1] - pre[u - 1]);
  --top;
}
void work() {
  top = 0;
  dfs(n + 1);
  write(Ans, '\n');
}
int main() {
  file();
  input();
  init();
  work();
  return 0;
}