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 N = 100500;
const int K = 230;
int D[N];
int A[N];
long long PS[N];
int st[N];
bool was[N];
vector<int> E[N];
int n, k;
struct block {
  int len = 0;
  long long X[K] = {0};
  long long dA[K] = {0};
  long long glob = 0;
  long long max_req = -(long long)1e18;
  long long max_X = -(long long)1e18;
  void add_global(long long d) { glob += d; }
  inline long long get_max_req() const { return max_req; }
  inline long long get_max_X() const { return max_X + glob; }
  void recalc() {
    assert(glob == 0);
    max_req = -(long long)1e18;
    for (int i = 0; i < len; i++) {
      long long got = i ? dA[i - 1] : 0;
      if (got > k) break;
      max_req = max(max_req, X[i] + k - got);
    }
    max_X = *max_element(X, X + len);
  }
  void flush() {
    for (int i = 0; i < len; i++) {
      X[i] += glob;
      dA[i] += glob;
    }
    max_X += glob;
    glob = 0;
  }
  void add_suff(int x, long long d) {
    flush();
    for (int i = x; i < len; i++) {
      X[i] += d;
      dA[i] += d;
    }
    recalc();
  }
  pair<int, long long> get(int l, long long prev_mx = -1e18) const {
    long long mx = prev_mx;
    if (l != -1) mx = X[l] + glob;
    int ans = 0;
    for (int i = l + 1; i < len; i++) {
      long long got_prev = (i ? dA[i - 1] : -(long long)1e18) + glob;
      long long got = dA[i] + glob;
      if (got_prev > k) break;
      if (X[i] + glob + k - got >= mx) {
        ans = max(ans, i - l);
      }
      mx = max(mx, X[i] + glob);
    }
    return make_pair(ans, mx);
  }
} B[N / K + 2];
int blocks;
void add_suff(int l, long long d) {
  int id = l / K;
  B[id].add_suff(l - id * K, d);
  while (++id < blocks) {
    B[id].add_global(d);
  }
}
int ans = 1;
void process(int l) {
  int ans;
  long long mx;
  int id = l / K;
  tie(ans, mx) = B[id].get(l - id * K);
  ++ans;
  int good_id = -1;
  long long good_mx = -42;
  int prev_good_id = -1;
  long long prev_good_mx = -42;
  while (++id < blocks) {
    if (B[id - 1].dA[K - 1] + B[id - 1].glob > k) break;
    if (B[id].get_max_req() >= mx) {
      prev_good_id = good_id;
      prev_good_mx = good_mx;
      good_id = id;
      good_mx = mx;
    }
    mx = max(mx, B[id].get_max_X());
  }
  if (good_id != -1) {
    if ((good_id + 1) * K - l <= ::ans) return;
    int ans2;
    tie(ans2, ignore) = B[good_id].get(-1, good_mx);
    if (ans2 == 0) {
      if (prev_good_id != -1) {
        if ((prev_good_id + 1) * K - l <= ::ans) return;
        tie(ans2, ignore) = B[prev_good_id].get(-1, prev_good_mx);
        assert(ans2 != -1);
        ans = ans2 + prev_good_id * K - l;
      }
    } else {
      ans = ans2 + good_id * K - l;
    }
  }
  ::ans = max(::ans, ans);
}
void DFS(int x, int p = -1) {
  was[x] = true;
  if (p != -1) add_suff(p - 1, PS[x] - PS[p]);
  process(x);
  for (int y : E[x]) {
    DFS(y, x);
  }
  if (p != -1) add_suff(p - 1, PS[p] - PS[x]);
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d", &D[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  for (int i = 1; i < n; i++) {
    PS[i] = PS[i - 1] + A[i - 1] - D[i - 1];
  }
  int pt = 0;
  for (int i = n - 1; i >= 0; i--) {
    while (pt > 0 && PS[st[pt - 1]] >= PS[i]) --pt;
    if (pt) E[st[pt - 1]].push_back(i);
    st[pt++] = i;
  }
  long long curX = 0;
  for (int i = 1; i < n; i++) curX = B[i / K].X[i % K] = curX + A[i] - D[i - 1];
  blocks = (n + K - 1) / K;
  for (int id = 0; id < blocks; id++) {
    B[id].len = min(K, n - id * K);
    B[id].recalc();
  }
  for (int i = 0; i < n; i++) {
    reverse(E[i].begin(), E[i].end());
  }
  for (int i = n - 1; i >= 0; i--) {
    if (!was[i]) DFS(i);
  }
  printf("%d\n", ans);
}