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 MXN = 100005;
struct SegmentTree {
  struct Node {
    long long mxsuf, mnp, mnr, tag;
  } tree[4 * MXN];
  int n;
  long long k;
  int at[MXN];
  void add_tag(int id, long long v) {
    tree[id].mxsuf += v;
    tree[id].mnr += v;
    tree[id].tag += v;
  }
  void push(int id) {
    if (!tree[id].tag) return;
    int lc = id * 2, rc = id * 2 + 1;
    add_tag(lc, tree[id].tag);
    add_tag(rc, tree[id].tag);
    tree[id].tag = 0;
  }
  long long calc(int l, int r, long long mx, int id) {
    if (l == r) return mx + tree[id].mnp;
    push(id);
    int m = (l + r) / 2, lc = id * 2, rc = id * 2 + 1;
    if (mx > tree[lc].mxsuf)
      return min(tree[lc].mnp + mx, calc(m + 1, r, mx, rc));
    return min(calc(l, m, mx, lc), tree[rc].mnr);
  }
  void pull(int l, int r, int id) {
    int m = (l + r) / 2;
    int lc = id * 2;
    int rc = id * 2 + 1;
    tree[id].mxsuf = max(tree[lc].mxsuf, tree[rc].mxsuf);
    tree[id].mnp = min(tree[lc].mnp, tree[rc].mnp);
    tree[id].mnr = calc(m + 1, r, tree[lc].mxsuf, rc);
  }
  void build(int l, int r, int id, long long suf[]) {
    tree[id].tag = 0;
    if (l == r) {
      at[l] = id;
      tree[id].mxsuf = suf[l];
      tree[id].mnp = -suf[l];
      return;
    }
    int m = (l + r) / 2, lc = id * 2, rc = id * 2 + 1;
    build(l, m, lc, suf);
    build(m + 1, r, rc, suf);
    pull(l, r, id);
  }
  void update(int l, int r, int fl, int fr, long long v, int id) {
    if (l == fl and r == fr) {
      add_tag(id, v);
      return;
    }
    push(id);
    int m = (l + r) / 2, lc = id * 2, rc = id * 2 + 1;
    if (fr < m)
      update(l, m, fl, fr, v, lc);
    else if (m < fl)
      update(m + 1, r, fl, fr, v, rc);
    else {
      update(l, m, fl, m, v, lc);
      update(m + 1, r, m + 1, fr, v, rc);
    }
    pull(l, r, id);
  }
  void add_suff(int x, long long v) { update(0, n - 1, x, n - 1, v, 1); }
  long long get_cost(int x) {
    long long ret = 0;
    for (int i = at[x]; i; i = i / 2) ret += tree[i].tag;
    return ret;
  }
  static const long long INF = 1LL << 60;
  long long mx_left;
  int query(int l, int r, int fl, int fr, long long mx, int id) {
    int m = (l + r) / 2, lc = id * 2, rc = id * 2 + 1;
    if (r < fl or fr < l) return 0;
    if (fl <= l and r <= fr) {
      mx_left = max(mx_left, tree[id].mxsuf);
      if (l == r) {
        if (mx + tree[id].mnp <= k)
          return l;
        else
          return 0;
      }
      push(id);
      if (calc(m + 1, r, max(mx, tree[lc].mxsuf), rc) <= k)
        return query(m + 1, r, fl, fr, max(mx, tree[lc].mxsuf), rc);
      return query(l, m, fl, fr, mx, lc);
    }
    push(id);
    int ret = query(l, m, fl, fr, mx, lc);
    ret = max(ret, query(m + 1, r, fl, fr, max(mx, mx_left), rc));
    return ret;
  }
  int query(int l, int r) {
    mx_left = -INF;
    return query(0, n - 1, l, r, -INF, 1);
  }
} tree;
int N;
long long K, W[MXN], G[MXN];
int ans, vst[MXN];
long long pre[MXN], suf[MXN], delta[MXN];
vector<int> child[MXN];
void add_suf(int id, long long v) { tree.add_suff(id, v); }
void calc(int i) {
  long long mx_left = -(1LL << 60);
  int l = i, r = N;
  while (l < r) {
    int m = (l + r) / 2;
    if (tree.get_cost(m) > K)
      r = m;
    else
      l = m + 1;
  }
  r = min(r, N - 1);
  if (r - i + 1 <= ans) return;
  int ret = tree.query(i, r) - i + 1;
  ans = max(ans, ret);
  return;
  for (int j = i; j <= r; j++) {
    if (mx_left - suf[j] + delta[j] <= K) ans = max(ans, j - i + 1);
    mx_left = max(mx_left, suf[j]);
    if (delta[j] > K) {
      break;
    }
  }
}
void DFS(int u, int f) {
  vst[u] = 1;
  if (f != -1) {
    add_suf(f - 1, pre[u] - pre[f]);
  }
  calc(u);
  for (auto v : child[u]) {
    DFS(v, u);
  }
  if (f != -1) {
    add_suf(f - 1, pre[f] - pre[u]);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  cin >> N >> K;
  for (int i = 0; i < (N - 1); i++) cin >> W[i];
  for (int i = 0; i < (N); i++) cin >> G[i];
  pre[0] = suf[0] = 0;
  for (int i = 0; i < (N); i++) {
    pre[i + 1] = pre[i] + G[i] - W[i];
    suf[i + 1] = suf[i] + G[i + 1] - W[i];
  }
  vector<int> stk;
  for (int i = N - 1; i >= 0; i--) {
    while (!stk.empty() and pre[stk.back()] >= pre[i]) stk.pop_back();
    if (!stk.empty()) {
      child[stk.back()].push_back(i);
    }
    stk.push_back(i);
  }
  tree.n = N;
  tree.k = K;
  ans = 0;
  tree.build(0, N - 1, 1, suf);
  for (int i = N - 1; i >= 0; i--) {
    if (!vst[i]) {
      DFS(i, -1);
    }
  }
  cout << ans << endl;
  return 0;
}