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>
const int TT = 100000 * 22 + 50;
char input_buffer[TT], output_buffer[TT];
char *input_pos = input_buffer, *output_pos = output_buffer;
inline int getint() {
  int x = 0, p = 1;
  char c = (*input_pos++);
  while (c <= 32) c = (*input_pos++);
  if (c == 45) p = -p, c = (*input_pos++);
  while (c > 32) x = x * 10 + c - 48, c = (*input_pos++);
  return x * p;
}
inline void write(int x) {
  if (!x) return;
  write(x / 10);
  (*output_pos++) = x % 10 + '0';
}
using namespace std;
const int N = 1e6 + 5;
const long long inf = 2e18;
int n, k, w[N], d[N], res[N];
long long a[N], b[N], dat[N << 2], tag[N << 2], mn[N << 2];
vector<int> st;
inline void add(int k, long long x) {
  dat[k] += x;
  tag[k] += x;
}
inline void pd(int k) {
  if (tag[k]) {
    add(2 * k + 1, tag[k]);
    add(2 * k + 2, tag[k]);
    tag[k] = 0;
  }
}
void upd(int l, int r, int k, int p) {
  if (r - l == 1) {
    mn[k] = dat[k] = b[p];
    return;
  }
  int mid = (l + r) >> 1;
  if (p < mid)
    upd(l, mid, 2 * k + 1, p);
  else
    upd(mid, r, 2 * k + 2, p);
  dat[k] = min(dat[2 * k + 1], dat[2 * k + 2]);
  mn[k] = min(mn[2 * k + 1], mn[2 * k + 2]);
}
void modify(int l, int r, int x, int y, int k, long long v) {
  if (l >= y || x >= r) return;
  if (x <= l && r <= y) {
    add(k, v);
    return;
  }
  pd(k);
  int mid = (l + r) >> 1;
  modify(l, mid, x, y, 2 * k + 1, v);
  modify(mid, r, x, y, 2 * k + 2, v);
  dat[k] = min(dat[2 * k + 1], dat[2 * k + 2]);
}
int qry(int l, int r, int p, int id, long long x) {
  if (r - l == 1) return l;
  pd(id);
  int mid = (l + r) >> 1;
  long long to = min(x, dat[2 * id + 1]);
  if (mid <= p && to >= mn[2 * id + 2] - k) {
    int ans = qry(mid, r, p, 2 * id + 2, to);
    if (ans >= 0) return ans;
  }
  if (mn[2 * id + 1] - k <= x) return qry(l, mid, p, 2 * id + 1, x);
  return -1;
}
int main() {
  for (int(i) = 0; (i) < (N << 2); (i)++) mn[i] = -inf, dat[i] = inf;
  fread(input_buffer, 1, TT, stdin);
  n = getint();
  k = getint();
  for (int(i) = 0; (i) < (n - 1); (i)++) d[i] = getint();
  for (int(i) = 0; (i) < (n); (i)++) w[i] = getint();
  for (int i = 1; i < n; i++) a[i] = a[i - 1] + w[i - 1] - d[i - 1];
  b[0] = -w[0];
  for (int i = 1; i < n; i++) b[i] = b[i - 1] - w[i] + d[i - 1];
  st.emplace_back(n);
  a[n] = -inf;
  int ans = 0;
  for (int i = n - 1; i >= 0; i--) {
    upd(0, n, 0, i);
    while (st.size() && a[st.back()] >= a[i]) {
      if (st.size() > 2)
        modify(0, n, st[st.size() - 2] - 1, n, 0,
               a[st.back()] - a[st[st.size() - 2]]);
      st.pop_back();
    }
    int lb = 0, rb = st.size();
    while (rb - lb > 1) {
      int mid = (lb + rb) >> 1;
      if (a[st[mid]] + k < a[i])
        lb = mid;
      else
        rb = mid;
    }
    if (st.size() > 1)
      modify(0, n, st[st.size() - 1] - 1, n, 0, a[st[st.size() - 1]] - a[i]);
    st.emplace_back(i);
    res[i] = qry(0, n, st[lb] - 1, 0, inf);
    ans = max(ans, res[i] - i + 1);
  }
  printf("%d\n", ans);
  return 0;
}