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 = 2e5 + 10;
const long long INF = 1e17;
int n, k, tot, top;
vector<int> E[N];
int nxt[N];
long long ans;
long long tag[N << 2], max_suf[N << 2], max_s[N << 2], max_p[N << 2], pre[N],
    suf[N], w[N], g[N];
int st[N];
template <typename T>
inline void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
inline void chkmin(T &x, T y) {
  x = min(x, y);
}
template <typename T>
inline void read(T &x) {
  T f = 1;
  x = 0;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + c - '0';
  x *= f;
}
inline void addedge(int u, int v) {
  E[u].push_back(v);
  return;
}
inline void pushdown(int now, int l, int r) {
  int mid = l + r >> 1;
  if (tag[now]) {
    tag[now << 1] += tag[now];
    tag[now << 1 | 1] += tag[now];
    max_suf[now << 1] += tag[now];
    max_suf[now << 1 | 1] += tag[now];
    max_s[now << 1] += tag[now];
    max_s[now << 1 | 1] += tag[now];
    tag[now] = 0;
  }
  return;
}
inline long long calc(int now, int l, int r, long long val) {
  if (l == r) return val + max_p[now];
  pushdown(now, l, r);
  int mid = l + r >> 1;
  if (max_suf[now << 1] >= val)
    return min(calc(now << 1, l, mid, val), max_s[now]);
  else
    return min(val + max_p[now << 1], calc(now << 1 | 1, mid + 1, r, val));
}
inline long long solve(int now, int l, int r, long long val) {
  if (l == r) return val + max_p[now] <= k ? l : 0;
  int mid = l + r >> 1;
  pushdown(now, l, r);
  if (val + max_p[now << 1 | 1] <= k)
    return solve(now << 1 | 1, mid + 1, r, val);
  else
    return solve(now << 1, l, mid, val);
}
inline long long query(int now, int l, int r, long long val) {
  if (l == r) return val + max_p[now] <= k ? l : 0;
  int mid = l + r >> 1;
  pushdown(now, l, r);
  if (max_suf[now << 1] >= val) {
    if (max_s[now] <= k)
      return query(now << 1 | 1, mid + 1, r, max_suf[now << 1]);
    else
      return query(now << 1, l, mid, val);
  } else
    return max(solve(now << 1, l, mid, val),
               query(now << 1 | 1, mid + 1, r, val));
}
inline void update(int l, int r, int now) {
  max_suf[now] = max(max_suf[now << 1], max_suf[now << 1 | 1]);
  int mid = l + r >> 1;
  max_s[now] = calc(now << 1 | 1, mid + 1, r, max_suf[now << 1]);
}
inline void build(int now, int l, int r) {
  if (l == r) {
    max_suf[now] = suf[l];
    max_p[now] = -suf[l];
    return;
  }
  int mid = l + r >> 1;
  build(now << 1, l, mid);
  build(now << 1 | 1, mid + 1, r);
  update(l, r, now);
  max_p[now] = min(max_p[now << 1], max_p[now << 1 | 1]);
  return;
}
inline void modify(int now, int l, int r, int ql, int qr, long long val) {
  if (ql > qr) return;
  if (l == ql && r == qr) {
    tag[now] += val;
    max_suf[now] += val;
    max_s[now] += val;
    return;
  }
  pushdown(now, l, r);
  int mid = l + r >> 1;
  if (mid >= qr)
    modify(now << 1, l, mid, ql, qr, val);
  else if (mid + 1 <= ql)
    modify(now << 1 | 1, mid + 1, r, ql, qr, val);
  else {
    modify(now << 1, l, mid, ql, mid, val);
    modify(now << 1 | 1, mid + 1, r, mid + 1, qr, val);
  }
  update(l, r, now);
}
inline void dfs(int x) {
  st[++top] = x;
  if (x != n + 1) {
    modify(1, 1, n, 1, x - 1, -INF);
    modify(1, 1, n, nxt[x] - 1, n, pre[x - 1] - pre[nxt[x] - 1]);
    int l = 1, r = top;
    while (l < r) {
      int mid = l + r >> 1;
      if (pre[x - 1] - pre[st[mid] - 1] <= k)
        r = mid;
      else
        l = mid + 1;
    }
    modify(1, 1, n, st[r - 1], n, INF);
    chkmax(ans, query(1, 1, n, -INF) - x + 1);
    modify(1, 1, n, st[r - 1], n, -INF);
    modify(1, 1, n, 1, x - 1, INF);
  }
  for (auto y : E[x]) dfs(y);
  if (x != n + 1)
    modify(1, 1, n, nxt[x] - 1, n, -(pre[x - 1] - pre[nxt[x] - 1]));
  --top;
}
int main() {
  read(n);
  read(k);
  for (int i = 1; i < n; ++i) read(w[i]);
  w[n] = INF;
  for (int i = 1; i <= n; ++i) {
    read(g[i]);
    pre[i] = pre[i - 1] + g[i] - w[i];
    suf[i] = suf[i - 1] + g[i] - w[i - 1];
  }
  st[top = 0] = n;
  for (int i = n - 1; i >= 0; --i) {
    while (top && pre[st[top]] >= pre[i]) --top;
    nxt[i + 1] = st[top] + 1;
    addedge(st[top] + 1, i + 1);
    st[++top] = i;
  }
  build(1, 1, n);
  top = 0;
  dfs(n + 1);
  printf("%d\n", ans);
  return 0;
}