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;
namespace TYC {
const int N = 100005, M = 17;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
int n, K, answer, Nxt[N], Fa[M][N], G[N], W[N];
long long Pre[N], Suf[N];
vector<int> E[N];
struct node {
  long long p, s, v, tag;
  void add(const long long t) { s += t, v += t, tag += t; }
} tr[N << 2];
inline int read() {
  int x = 0, f = 0, ch = getchar();
  while (!isdigit(ch)) f |= (ch == '-'), ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? -x : x;
}
inline void pushdown(const int o) {
  long long t = tr[o].tag;
  if (t) {
    tr[(o << 1)].add(t);
    tr[(o << 1 | 1)].add(t);
    tr[o].tag = 0;
  }
}
long long calc(const int o, const int l, const int r, const long long x) {
  if (l == r) return x + tr[o].p;
  int mid = (l + r) >> 1;
  pushdown(o);
  long long y = tr[(o << 1)].s;
  if (x >= y)
    return min(x + tr[(o << 1)].p, calc((o << 1 | 1), mid + 1, r, x));
  else
    return min(calc((o << 1), l, mid, x), tr[o].v);
}
inline void maintain(const int o, const int l, const int r) {
  tr[o].s = max(tr[(o << 1)].s, tr[(o << 1 | 1)].s);
  tr[o].v = calc((o << 1 | 1), (l + r) / 2 + 1, r, tr[(o << 1)].s);
}
void build(const int o = 1, const int l = 1, const int r = n) {
  if (l == r) {
    tr[o].p = -Suf[l];
    tr[o].s = Suf[l];
    return;
  }
  int mid = (l + r) >> 1;
  build((o << 1), l, mid);
  build((o << 1 | 1), mid + 1, r);
  tr[o].p = min(tr[(o << 1)].p, tr[(o << 1 | 1)].p);
  maintain(o, l, r);
}
void add(const int s, const int e, const long long v, const int o = 1,
         const int l = 1, const int r = n) {
  if (s <= l && r <= e) return tr[o].add(v);
  int mid = (l + r) >> 1;
  pushdown(o);
  if (s <= mid) add(s, e, v, (o << 1), l, mid);
  if (e > mid) add(s, e, v, (o << 1 | 1), mid + 1, r);
  maintain(o, l, r);
}
int find(const int o, const int l, const int r, const long long x) {
  if (l == r) return x + tr[o].p <= K ? l : 0;
  int mid = (l + r) >> 1;
  pushdown(o);
  if (x + tr[(o << 1 | 1)].p <= K)
    return find((o << 1 | 1), mid + 1, r, x);
  else
    return find((o << 1), l, mid, x);
}
int query(const int o = 1, const int l = 1, const int r = n,
          const long long x = -INF) {
  if (l == r) return tr[o].p + x <= K ? l : 0;
  int mid = (l + r) >> 1, p;
  pushdown(o);
  long long y = tr[(o << 1)].s;
  if (x >= y) {
    p = query((o << 1 | 1), mid + 1, r, x);
    if (!p && x + tr[(o << 1)].p <= K) p = find((o << 1), l, mid, x);
  } else {
    if (tr[o].v <= K)
      p = query((o << 1 | 1), mid + 1, r, y);
    else
      p = query((o << 1), l, mid, x);
  }
  return p;
}
void init() {
  for (int i = 1; i <= n; i++) {
    Pre[i] = Pre[i - 1] + G[i] - W[i];
    Suf[i] = Suf[i - 1] + G[i] - W[i - 1];
  }
  static int sta[N], top;
  for (int i = n; i; i--) {
    while (top && Pre[i - 1] <= Pre[sta[top] - 1]) top--;
    Nxt[i] = top ? sta[top] : n + 1;
    sta[++top] = i;
  }
  for (int i = 1; i <= n; i++) E[Nxt[i]].push_back(i);
  Nxt[n + 1] = n + 1;
}
inline int get_ancestor(const int u) {
  int x = u;
  for (int i = M - 1; ~i; i--)
    if (Fa[i][x] && Fa[i][x] != n + 1 && Pre[u - 1] - Pre[Fa[i][x] - 1] <= K)
      x = Fa[i][x];
  return Fa[0][x];
}
void dfs(const int u) {
  for (int i = 1; i < M && Fa[i - 1][u]; i++)
    Fa[i][u] = Fa[i - 1][Fa[i - 1][u]];
  if (Nxt[u] <= n) add(Nxt[u] - 1, n, Pre[u - 1] - Pre[Nxt[u] - 1]);
  if (u <= n) {
    int p = get_ancestor(u);
    if (p <= n) add(p - 1, n, INF);
    if (u != 1) add(1, u - 1, -INF);
    answer = max(answer, query() - u + 1);
    if (p <= n) add(p - 1, n, -INF);
    if (u != 1) add(1, u - 1, INF);
  }
  for (int v : E[u]) Fa[0][v] = u, dfs(v);
  if (u <= n) add(Nxt[u] - 1, n, Pre[Nxt[u] - 1] - Pre[u - 1]);
}
void work() {
  n = read(), K = read();
  for (int i = 1; i < n; i++) W[i] = read();
  for (int i = 1; i <= n; i++) G[i] = read();
  init();
  build(1, 1, n);
  dfs(n + 1);
  printf("%d\n", answer);
}
}  // namespace TYC
int main() {
  TYC::work();
  return 0;
}