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>
const int N = 100000 + 10;
const long long INF = 1LL << 50;
int n, k, ans;
int w[N], g[N];
int succ[N];
long long val[N];
std::vector<int> adj[N];
long long suf[N];
void init() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; ++i) scanf("%d", &w[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &g[i]);
  static long long sum[N];
  for (int i = 1; i < n; ++i) sum[i + 1] = sum[i] + g[i] - w[i];
  static int stk[N];
  std::fill(succ + 1, succ + n + 1, n);
  for (int i = 1, top = 0; i <= n; ++i) {
    for (; top && sum[stk[top]] > sum[i]; --top) succ[stk[top]] = i;
    stk[++top] = i;
  }
  for (int i = 1; i <= n; ++i) val[i] = std::max(0LL, sum[i] - sum[succ[i]]);
  for (int i = 1; i < n; ++i) adj[succ[i]].push_back(i);
  for (int i = n; i > 1; --i) suf[i - 1] = suf[i] + g[i] - w[i - 1];
}
inline int pos(int l, int r) { return (l + r) | (l != r); }
struct Tag {
  long long x, y;
  explicit Tag(long long _x = 0, long long _y = 0) : x(_x), y(_y) {}
  inline bool any() const { return x || y; }
  inline Tag &operator+=(const Tag &rhs) {
    x += rhs.x;
    y += rhs.y;
    return *this;
  }
} tag[2 * N];
struct Info {
  long long x, y, z;
  inline Info &operator+=(const Tag &rhs) {
    x += rhs.x;
    y += rhs.y;
    z += rhs.x + rhs.y;
    return *this;
  }
} info[2 * N];
long long mem[2 * N];
void apply(int l, int r, const Tag &t) {
  int id = pos(l, r);
  info[id] += t;
  tag[id] += t;
  mem[id] += t.x;
}
void release(int l, int r) {
  int id = pos(l, r);
  if (tag[id].any()) {
    int mid = (l + r) >> 1;
    apply(l, mid, tag[id]);
    apply(mid + 1, r, tag[id]);
    tag[id] = Tag();
  }
}
long long query(int l, int r, long long y) {
  int id = pos(l, r);
  if (info[id].y >= y || l == r) return info[id].z - y;
  release(l, r);
  int mid = (l + r) >> 1, lch = pos(l, mid);
  long long res = query(l, mid, y);
  res = std::min(res, info[lch].y <= y ? mem[id] : query(mid + 1, r, y));
  return res;
}
void update(int l, int r) {
  int id = pos(l, r), mid = (l + r) >> 1, lch = pos(l, mid),
      rch = pos(mid + 1, r);
  info[id].x = std::max(info[lch].x, info[rch].x);
  info[id].y = std::min(info[lch].y, info[rch].y);
  info[id].z = std::min(info[lch].z, info[rch].z);
  mem[id] = query(mid + 1, r, info[lch].y);
}
void build(int l, int r) {
  if (l == r) {
    int id = pos(l, r);
    info[id].y = info[id].z = suf[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(l, mid);
  build(mid + 1, r);
  update(l, r);
}
void add(int l, int r, int p, int q, const Tag &t) {
  if (p <= l && r <= q) {
    apply(l, r, t);
    return;
  }
  release(l, r);
  int mid = (l + r) >> 1;
  if (p <= mid) add(l, mid, p, q, t);
  if (q > mid) add(mid + 1, r, p, q, t);
  update(l, r);
}
int queryX(int l, int r) {
  if (l == r) return l;
  release(l, r);
  int mid = (l + r) >> 1, lch = pos(l, mid);
  return info[lch].x <= k ? queryX(mid + 1, r) : queryX(l, mid);
}
long long cur;
int query(int l, int r, int p, int q) {
  int id = pos(l, r);
  if (l == r) {
    int res = info[id].z - cur <= k ? l : 0;
    cur = std::min(cur, info[id].y);
    return res;
  }
  release(l, r);
  int mid = (l + r) >> 1;
  if (p <= l && r <= q) {
    long long temp = std::min(cur, info[pos(l, mid)].y);
    int res = 0;
    if (query(mid + 1, r, temp) <= k) {
      cur = temp;
      res = query(mid + 1, r, p, q);
    } else {
      res = query(l, mid, p, q);
    }
    cur = std::min(cur, info[id].y);
    return res;
  }
  int res = 0;
  if (p <= mid) res = query(l, mid, p, q);
  if (q > mid) res = std::max(res, query(mid + 1, r, p, q));
  return res;
}
void dfs(int a) {
  if (succ[a] >= 3) add(1, n, 1, succ[a] - 2, Tag(0, val[a]));
  add(1, n, succ[a] - 1, n, Tag(val[a], 0));
  cur = INF;
  ans = std::max(ans, std::min(queryX(1, n), query(1, n, a, n)) - a + 1);
  for (auto b : adj[a]) dfs(b);
  if (succ[a] >= 3) add(1, n, 1, succ[a] - 2, Tag(0, -val[a]));
  add(1, n, succ[a] - 1, n, Tag(-val[a], 0));
}
int main() {
  init();
  build(1, n);
  dfs(n);
  printf("%d\n", ans);
  return 0;
}