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;
long long inf;
const double eps = 1e-8;
const double pi = acos(-1.0);
template <class T>
long long chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
long long chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T mmin(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T mmax(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T aabs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
long long dcmp(T a, T b) {
  return a > b;
}
template <long long *a>
long long cmp_a(long long first, long long second) {
  return a[first] < a[second];
}
struct __INIT__ {
  __INIT__() { memset(&inf, 0x3f, sizeof(inf)); }
} __INIT___;
namespace io {
const long long SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
long long f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char first) {
  *oS++ = first;
  if (oS == oT) flush();
}
template <typename A>
inline bool read(A &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
  return 1;
}
inline bool read(char &first) {
  while ((first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                               (iS == iT ? EOF : *iS++))
                            : *iS++)) == ' ' ||
         first == '\n' || first == '\r')
    ;
  return first != EOF;
}
inline bool read(char *first) {
  while ((*first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                                (iS == iT ? EOF : *iS++))
                             : *iS++)) == '\n' ||
         *first == ' ' || *first == '\r')
    ;
  if (*first == EOF) return 0;
  while (!(*first == '\n' || *first == ' ' || *first == '\r'))
    *(++first) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                           : *iS++);
  *first = 0;
  return 1;
}
template <typename A, typename... B>
inline bool read(A &first, B &...second) {
  return read(first) && read(second...);
}
template <typename A>
inline bool write(A first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char first) {
  putc(first);
  return 0;
}
inline bool write(const char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
inline bool write(char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
template <typename A, typename... B>
inline bool write(A first, B... second) {
  return write(first) || write(second...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
long long a[100005], b[100005], f[100005], g[100005];
long long s[100005], t;
long long n, k;
struct smt {
  long long amn, bmn, atg;
  long long ls, rs;
  smt *l, *r;
  smt(long long la, long long ra) {
    amn = inf;
    bmn = -inf;
    atg = 0;
    ls = la;
    rs = ra;
    if (ls == rs) {
      l = r = 0;
    } else {
      long long mid = (ls + rs) >> 1;
      l = new smt(ls, mid);
      r = new smt(mid + 1, rs);
    }
  }
  void setg(long long first) {
    if (ls == rs) {
      amn = bmn = g[first];
      return;
    }
    if (first <= l->rs)
      l->setg(first);
    else
      r->setg(first);
    amn = mmin(l->amn, r->amn);
    bmn = mmin(l->bmn, r->bmn);
  }
  void push_down() {
    l->atg += atg;
    l->amn += atg;
    r->atg += atg;
    r->amn += atg;
    atg = 0;
  }
  void add(long long la, long long ra, long long w) {
    if (la <= ls && rs <= ra) {
      atg += w;
      amn += w;
      return;
    }
    push_down();
    if (la <= l->rs) l->add(la, ra, w);
    if (ra >= r->ls) r->add(la, ra, w);
    amn = mmin(l->amn, r->amn);
  }
  long long query(long long first, long long rm) {
    if (ls > rm) return 0;
    if (ls == rs) return ls;
    push_down();
    if (mmin(first, l->amn) >= r->bmn - k)
      return r->query(mmin(first, l->amn), rm);
    return l->query(first, rm);
  }
};
smt *rt;
signed main() {
  read(n, k);
  rt = new smt(1, n);
  for (long long i = 1; i < n; ++i) read(b[i]);
  for (long long i = 1; i <= n; ++i) read(a[i]);
  for (long long i = 1; i <= n; ++i) {
    f[i] = f[i - 1] + a[i - 1] - b[i - 1];
  }
  for (long long i = 1; i <= n; ++i) {
    g[i] = g[i - 1] + b[i - 1] - a[i];
  }
  long long ans = 0;
  for (long long i = n; i; --i) {
    rt->setg(i);
    while (t && f[s[t]] >= f[i]) {
      if (t > 1) {
        rt->add(s[t - 1] - 1, n, f[s[t]] - f[s[t - 1]]);
      }
      --t;
    }
    s[++t] = i;
    if (t > 1) {
      rt->add(s[t - 1] - 1, n, f[s[t - 1]] - f[s[t]]);
    }
    s[0] = n + 1;
    long long l = 1, r = t, mid;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (f[i] - f[s[mid]] <= k)
        r = mid - 1;
      else
        l = mid + 1;
    }
    chkmax(ans, rt->query(inf, s[r] - 1) - i + 1);
  }
  write(ans, '\n');
  return 0;
}