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;
template <typename T>
inline bool chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const int oo = 0x3f3f3f3f;
const long long OO = 0x3f3f3f3f3f3f3f3fLL;
const int maxn = 100000;
int n, K;
int a[maxn + 5], b[maxn + 5];
long long p0[maxn + 5], p1[maxn + 5];
struct node {
  long long Maxv, Mind, Maxp, Maxcost;
  long long label;
  node *c[2];
  node() : Maxv(-OO), Mind(0), Maxp(-OO), Maxcost(0) { memset(c, 0, sizeof c); }
  void update() {
    Maxv = Maxp = -OO;
    Maxcost = 0;
    for (int i = (0), _end_ = (2); i < _end_; ++i)
      if (c[i])
        chkmax(Maxv, c[i]->Maxv), chkmax(Maxp, c[i]->Maxp),
            chkmax(Maxcost, c[i]->Maxcost);
  }
  void flag_label(long long _label) {
    label += _label;
    Maxv += _label;
    Mind += _label;
    Maxcost += _label;
  }
  void push_down() {
    if (label) {
      for (int i = (0), _end_ = (2); i < _end_; ++i)
        if (c[i]) c[i]->flag_label(label);
      label = 0;
    }
  }
};
node nd[(maxn << 1) + 5];
int cur = 0;
node *rt;
inline node *newnode() { return nd + (cur++); }
int seg_x, seg_y;
long long seg_z;
long long seg_Max;
int seg_ret;
long long qmind_ret;
void qmind(node *rt) {
  if (!rt) return;
  if (!rt->c[0] && !rt->c[1])
    chkmin(qmind_ret, seg_Max - rt->Maxp);
  else {
    if (rt->c[0]->Maxv >= seg_Max)
      chkmin(qmind_ret, rt->c[1]->Mind), qmind(rt->c[0]);
    else
      chkmin(qmind_ret, seg_Max - rt->c[0]->Maxp), qmind(rt->c[1]);
  }
}
inline void updmd(node *rt) {
  seg_Max = rt->c[0]->Maxv, qmind_ret = OO;
  qmind(rt->c[1]);
  rt->c[1]->Mind = qmind_ret;
}
void build(node *&rt, int l, int r) {
  rt = newnode();
  if (r - l <= 1) {
    rt->Maxv = rt->Maxp = p1[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(rt->c[0], l, mid);
  build(rt->c[1], mid, r);
  rt->update();
  updmd(rt);
}
void add(node *rt, int l, int r) {
  if (!rt) return;
  if (seg_x <= l && r <= seg_y) {
    rt->flag_label(seg_z);
    return;
  }
  rt->push_down();
  int mid = (l + r) >> 1;
  if (seg_x < mid) add(rt->c[0], l, mid);
  if (seg_y > mid) add(rt->c[1], mid, r);
  rt->update();
  updmd(rt);
}
long long qmax_ret;
void qmax(node *rt, int l, int r) {
  if (!rt) return;
  if (seg_x <= l && r <= seg_y) {
    chkmax(qmax_ret, rt->Maxv);
    return;
  }
  rt->push_down();
  int mid = (l + r) >> 1;
  if (seg_x < mid) qmax(rt->c[0], l, mid);
  if (seg_y > mid) qmax(rt->c[1], mid, r);
}
void query(node *rt, int l, int r) {
  if (!rt) return;
  if (seg_x <= l && r <= seg_y) {
    qmind_ret = OO;
    qmind(rt);
    if (qmind_ret > K) return;
    chkmax(seg_ret, l);
  }
  rt->push_down();
  int mid = (l + r) >> 1;
  if (seg_y > mid) {
    long long tmp = seg_Max;
    qmax_ret = -OO;
    qmax(rt->c[0], l, mid);
    chkmax(seg_Max, qmax_ret);
    query(rt->c[1], mid, r);
    seg_Max = tmp;
  }
  if (seg_ret < mid && seg_x < mid) query(rt->c[0], l, mid);
}
int find_ret = 0;
void find(node *rt, int l, int r) {
  if (!rt) return;
  if (r - l <= 1) return;
  rt->push_down();
  int mid = (l + r) >> 1;
  if (rt->c[0]->Maxcost > K)
    find(rt->c[0], l, mid);
  else
    find_ret = mid, find(rt->c[1], mid, r);
}
vector<int> chd[maxn + 5];
int fa[maxn + 5];
int ans = 0;
void dfs(int first) {
  if (~fa[first])
    seg_x = fa[first] - 1, seg_y = n, seg_z = p0[first] - p0[fa[first]],
    add(rt, 0, n);
  find_ret = 0;
  find(rt, 0, n);
  seg_x = first, seg_y = find_ret + 1, seg_Max = -OO, seg_ret = first;
  query(rt, 0, n);
  chkmax(ans, seg_ret - first + 1);
  for (auto second : chd[first]) dfs(second);
  if (~fa[first])
    seg_x = fa[first] - 1, seg_y = n, seg_z = p0[fa[first]] - p0[first],
    add(rt, 0, n);
}
int main() {
  scanf("%d%d", &n, &K);
  for (int i = (0), _end_ = (n - 1); i < _end_; ++i) scanf("%d", a + i);
  a[n - 1] = 0;
  for (int i = (0), _end_ = (n); i < _end_; ++i) scanf("%d", b + i);
  p0[0] = p1[0] = 0;
  for (int i = (0), _end_ = (n - 1); i < _end_; ++i)
    p0[i + 1] = p0[i] + b[i] - a[i], p1[i + 1] = p1[i] + b[i + 1] - a[i];
  static int stk[maxn + 5];
  int tot = 0;
  for (int i = n - 1; i >= 0; --i) {
    while (tot && p0[stk[tot - 1]] >= p0[i]) --tot;
    if (tot)
      chd[stk[tot - 1]].push_back(i), fa[i] = stk[tot - 1];
    else
      fa[i] = -1;
    stk[tot++] = i;
  }
  build(rt, 0, n);
  for (int i = (0), _end_ = (n); i < _end_; ++i)
    if (!~fa[i]) dfs(i);
  printf("%d\n", ans);
  return 0;
}