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 SHENZHEBEI {
static const int GYN = 2333333;
char SZB[GYN], *SS = SZB, *TT = SZB;
inline char gc() {
  if (SS == TT) {
    TT = (SS = SZB) + fread(SZB, 1, GYN, stdin);
    if (SS == TT) return '\n';
  }
  return *SS++;
}
inline long long read() {
  long long x = 0, g = 1;
  char ch = gc();
  for (; !isdigit(ch); ch = gc())
    if (ch == '-') g = -1;
  for (; isdigit(ch); ch = gc()) x = x * 10 - 48 + ch;
  return x * g;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline char readchar() {
  char ch = gc();
  for (; isspace(ch); ch = gc())
    ;
  return ch;
}
inline long long readstr(char *s) {
  char ch = gc();
  int cur = 0;
  for (; isspace(ch); ch = gc())
    ;
  for (; !isspace(ch); ch = gc()) s[cur++] = ch;
  s[cur] = '\0';
  return cur;
}
void Print(long long *a, int s, int t) {
  for (int i = (long long)(s); i <= (long long)(t); ++i)
    printf("%long longd ", a[i]);
}
void Print(int *a, int s, int t) {
  for (int i = (long long)(s); i <= (long long)(t); ++i) printf("%d ", a[i]);
}
void Print(char *a, int s, int t) {
  for (int i = (long long)(s); i <= (long long)(t); ++i) putchar(a[i]);
}
void writeln(long long x) {
  write(x);
  puts("");
}
void Min(long long &x, long long y) { x = x < y ? x : y; }
void Max(long long &x, long long y) { x = x > y ? x : y; }
long long min(long long x, long long y) { return x < y ? x : y; }
long long max(long long x, long long y) { return x < y ? y : x; }
}  // namespace SHENZHEBEI
using namespace SHENZHEBEI;
const long long N = 1600010;
vector<long long> son[N];
long long h[N], a[N], b[N], c[N], tag[N], w[N], g[N], q[N], s1[N], s2[N];
long long n, m, ans, top;
void add(long long p, long long x) {
  a[p] += x;
  c[p] += x;
  tag[p] += x;
}
void pushdown(long long p) {
  if (tag[p]) add(p << 1, tag[p]), add(p << 1 | 1, tag[p]), tag[p] = 0;
}
long long calc(long long l, long long r, long long p, long long x) {
  if (l == r) return x - b[p];
  pushdown(p);
  long long mid = (l + r) >> 1;
  if (x > a[p << 1]) return min(x - b[p << 1], calc(mid + 1, r, p << 1 | 1, x));
  return min(calc(l, mid, p << 1, x), c[p]);
}
void build(long long l, long long r, long long p) {
  if (l == r) return a[p] = b[p] = s2[l], void(0);
  long long mid = (l + r) >> 1;
  build(l, mid, p << 1);
  build(mid + 1, r, p << 1 | 1);
  a[p] = max(a[p << 1], a[p << 1 | 1]),
  c[p] = calc(mid + 1, r, p << 1 | 1, a[p << 1]);
  b[p] = max(b[p << 1], b[p << 1 | 1]);
}
void add(long long l, long long r, long long p, long long s, long long t,
         long long x) {
  if (l == s && r == t) return add(p, x), void(0);
  long long mid = (l + r) >> 1;
  pushdown(p);
  if (t <= mid)
    add(l, mid, p << 1, s, t, x);
  else if (s > mid)
    add(mid + 1, r, p << 1 | 1, s, t, x);
  else
    add(l, mid, p << 1, s, mid, x), add(mid + 1, r, p << 1 | 1, mid + 1, t, x);
  a[p] = max(a[p << 1], a[p << 1 | 1]),
  c[p] = calc(mid + 1, r, p << 1 | 1, a[p << 1]);
}
long long solve(long long l, long long r, long long p, long long x) {
  if (l == r) return x - b[p] > m ? 0 : l;
  pushdown(p);
  long long mid = (l + r) >> 1;
  if (x - b[p << 1 | 1] <= m) return solve(mid + 1, r, p << 1 | 1, x);
  return solve(l, mid, p << 1, x);
}
long long query(long long l, long long r, long long p, long long x) {
  if (l == r) return x - b[p] > m ? 0 : l;
  pushdown(p);
  long long mid = (l + r) >> 1, ans = 0;
  if (x > a[p << 1])
    ans = solve(l, mid, p << 1, x);
  else if (c[p] > m)
    return query(l, mid, p << 1, x);
  return max(ans, query(mid + 1, r, p << 1 | 1, max(x, a[p << 1])));
}
inline void solve(int x) {
  h[++*h] = x;
  if (x > 1) add(1, n, 1, 1, x - 1, -1e18);
  long long l = 1, r = *h, pos = n;
  for (; l <= r;) {
    long long mid = (l + r) >> 1;
    if (s1[x] - s1[h[mid]] > m)
      pos = h[mid] - 1, l = mid + 1;
    else
      r = mid - 1;
  }
  add(1, n, 1, pos, n, 1e18);
  Max(ans, query(1, n, 1, -1e18) - x + 1);
  add(1, n, 1, pos, n, -1e18);
  if (x > 1) add(1, n, 1, 1, x - 1, 1e18);
  for (int i = (long long)(0); i < (long long)(son[x].size()); ++i) {
    if (x > 1) add(1, n, 1, x - 1, n, s1[son[x][i]] - s1[x]);
    solve(son[x][i]);
    if (x > 1) add(1, n, 1, x - 1, n, s1[x] - s1[son[x][i]]);
  }
  --*h;
}
int main() {
  n = read(), m = read();
  for (int i = (long long)(1); i < (long long)(n); ++i) w[i] = read();
  for (int i = (long long)(1); i <= (long long)(n); ++i) g[i] = read();
  for (int i = (long long)(1); i < (long long)(n); ++i)
    s1[i + 1] = s1[i] + g[i] - w[i], s2[i + 1] = s2[i] + g[i + 1] - w[i];
  build(1, n, 1);
  for (int i = (long long)(1); i <= (long long)(n); ++i) {
    for (; top && s1[i] < s1[q[top]];) son[i].push_back(q[top--]);
    q[++top] = i;
  }
  for (int i = (long long)(1); i <= (long long)(top); ++i) solve(q[i]);
  writeln(ans);
}