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 MAXN = 2e5 + 5;
const long long INF = 1e18;
template <typename T>
void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
long long x[MAXN], y[MAXN];
vector<int> a[MAXN];
int n, k, ans, g[MAXN], w[MAXN], fa[MAXN];
struct BinaryIndexTree {
  int n;
  long long a[MAXN];
  void init(int x) {
    n = x;
    memset(a, 0, sizeof(a));
  }
  void modify(int x, long long d) {
    for (int i = x; i <= n; i += i & -i) a[i] += d;
  }
  long long query(int x) {
    long long ans = 0;
    for (int i = x; i >= 1; i -= i & -i) ans += a[i];
    return ans;
  }
} BIT;
struct SegmentTree {
  struct Node {
    int lc, rc, rev;
    long long tagh, tagc;
    long long Maxh, Minc, res;
  } a[MAXN * 2];
  int root, size, n;
  void pushdown(int root) {
    if (a[root].tagh) {
      a[a[root].lc].tagh += a[root].tagh;
      a[a[root].lc].Maxh += a[root].tagh;
      a[a[root].lc].res += a[root].tagh;
      a[a[root].rc].tagh += a[root].tagh;
      a[a[root].rc].Maxh += a[root].tagh;
      a[a[root].rc].res += a[root].tagh;
      a[root].tagh = 0;
    }
    if (a[root].tagc) {
      a[a[root].lc].tagc += a[root].tagc;
      a[a[root].lc].Minc += a[root].tagc;
      a[a[root].lc].res += a[root].tagc;
      a[a[root].rc].tagc += a[root].tagc;
      a[a[root].rc].Minc += a[root].tagc;
      a[a[root].rc].res += a[root].tagc;
      a[root].tagc = 0;
    }
  }
  long long query(int root, long long height) {
    if (a[root].lc == 0)
      return a[root].Minc +
             max(height, y[a[root].rev] + BIT.query(a[root].rev));
    else {
      pushdown(root);
      if (height <= a[a[root].lc].Maxh)
        return min(a[root].res, query(a[root].lc, height));
      else
        return min(height + a[a[root].lc].Minc,
                   query(a[root].rc, max(height, a[a[root].lc].Maxh)));
    }
  }
  void update(int root) {
    a[root].Maxh = max(a[a[root].lc].Maxh, a[a[root].rc].Maxh);
    a[root].Minc = min(a[a[root].lc].Minc, a[a[root].rc].Minc);
    a[root].res = query(a[root].rc, a[a[root].lc].Maxh);
  }
  void build(int &root, int l, int r, long long *x) {
    root = ++size;
    if (l == r) {
      a[root].rev = l;
      a[root].Maxh = x[l];
      a[root].Minc = -x[l];
      a[root].res = 0;
      return;
    }
    int mid = (l + r) / 2;
    build(a[root].lc, l, mid, x);
    build(a[root].rc, mid + 1, r, x);
    update(root);
  }
  void init(int l, long long *x) {
    root = size = 0, n = l;
    build(root, 1, n, x);
  }
  void addcost(int root, int l, int r, int ql, int qr, long long d) {
    if (l == ql && r == qr) {
      a[root].tagc += d;
      a[root].Minc += d;
      a[root].res += d;
      return;
    }
    pushdown(root);
    int mid = (l + r) / 2;
    if (mid >= ql) addcost(a[root].lc, l, mid, ql, min(mid, qr), d);
    if (mid + 1 <= qr) addcost(a[root].rc, mid + 1, r, max(mid + 1, ql), qr, d);
    update(root);
  }
  void addcost(int l, int r, long long d) { addcost(root, 1, n, l, r, d); }
  void addheight(int root, int l, int r, int ql, int qr, long long d) {
    if (l == ql && r == qr) {
      a[root].tagh += d;
      a[root].Maxh += d;
      a[root].tagc -= d;
      a[root].Minc -= d;
      return;
    }
    pushdown(root);
    int mid = (l + r) / 2;
    if (mid >= ql) addheight(a[root].lc, l, mid, ql, min(mid, qr), d);
    if (mid + 1 <= qr)
      addheight(a[root].rc, mid + 1, r, max(mid + 1, ql), qr, d);
    update(root);
  }
  void addheight(int l, int r, long long d) { addheight(root, 1, n, l, r, d); }
  int home;
  long long Max, Mem;
  void dfs(int root, int l, int r, int pos, long long Lim) {
    if (pos <= l) {
      if (query(root, Max) <= Lim) {
        home = root;
        Mem = Max;
      }
      chkmax(Max, a[root].Maxh);
      return;
    }
    pushdown(root);
    int mid = (l + r) / 2;
    if (pos <= mid) dfs(a[root].lc, l, mid, pos, Lim);
    dfs(a[root].rc, mid + 1, r, pos, Lim);
  }
  int getans(int root, long long height, long long Lim) {
    if (a[root].lc == 0) return a[root].rev;
    pushdown(root);
    if (query(a[root].rc, max(height, a[a[root].lc].Maxh)) <= Lim)
      return getans(a[root].rc, max(height, a[a[root].lc].Maxh), Lim);
    else
      return getans(a[root].lc, height, Lim);
  }
  int getans(int pos, long long Lim) {
    Max = BIT.query(pos) + y[pos];
    dfs(root, 1, n, pos, Lim);
    return getans(home, Mem, Lim);
  }
} ST;
void dfs(int pos, int fa) {
  chkmax(ans, ST.getans(pos, k) - pos + 1);
  for (auto p : a[pos]) {
    BIT.modify(pos, x[p] - x[pos]);
    ST.addcost(pos - 1, n, x[p] - x[pos]);
    ST.addheight(pos - 1, n, x[p] - x[pos]);
    dfs(p, pos);
    BIT.modify(pos, x[pos] - x[p]);
    ST.addcost(pos - 1, n, x[pos] - x[p]);
    ST.addheight(pos - 1, n, x[pos] - x[p]);
  }
}
int main() {
  read(n), read(k);
  for (int i = 1; i <= n - 1; i++) read(w[i]);
  for (int i = 1; i <= n; i++) read(g[i]);
  y[1] = g[1];
  for (int i = 2; i <= n; i++) {
    x[i] = y[i - 1] - w[i - 1];
    y[i] = x[i] + g[i];
  }
  static int q[MAXN];
  int top = 0;
  for (int i = n; i >= 1; i--) {
    while (top >= 1 && x[i] <= x[q[top]]) top--;
    if (top >= 1) {
      fa[i] = q[top];
      a[q[top]].push_back(i);
    }
    q[++top] = i;
  }
  BIT.init(n);
  ST.init(n, y);
  for (int i = 1; i <= n; i++)
    if (fa[i] == 0) dfs(i, 0);
  cout << ans << endl;
  return 0;
}