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;
const int N = 1e5 + 10;
struct node {
  long long mxs, mncs, rs, d;
} T[N << 2];
void push(int first, int l, int r) {
  if (T[first].d) {
    T[first].mxs += T[first].d, T[first].rs += T[first].d;
    if (l < r)
      T[(first << 1)].d += T[first].d, T[((first << 1) | 1)].d += T[first].d;
    T[first].d = 0;
  }
}
long long cal(int first, int l, int r, long long second) {
  push(first, l, r);
  if (l == r || second >= T[first].mxs) return second + T[first].mncs;
  push((first << 1), l, ((l + r) >> 1)),
      push(((first << 1) | 1), ((l + r) >> 1) + 1, r);
  if (second <= T[(first << 1)].mxs)
    return min(cal((first << 1), l, ((l + r) >> 1), second), T[first].rs);
  else
    return min(cal((first << 1), l, ((l + r) >> 1), second),
               cal(((first << 1) | 1), ((l + r) >> 1) + 1, r, second));
}
void upd(int first, int l, int r) {
  T[first].mxs = max(T[(first << 1)].mxs, T[((first << 1) | 1)].mxs);
  T[first].mncs = min(T[(first << 1)].mncs, T[((first << 1) | 1)].mncs);
  T[first].rs =
      cal(((first << 1) | 1), ((l + r) >> 1) + 1, r, T[(first << 1)].mxs);
}
int a, b;
long long c;
void add(int first, int l, int r) {
  push(first, l, r);
  if (a <= l && r <= b)
    T[first].d += c, push(first, l, r);
  else {
    push(first, l, r);
    if (a <= ((l + r) >> 1))
      add((first << 1), l, ((l + r) >> 1));
    else
      push((first << 1), l, ((l + r) >> 1));
    if (b > ((l + r) >> 1))
      add(((first << 1) | 1), ((l + r) >> 1) + 1, r);
    else
      push(((first << 1) | 1), ((l + r) >> 1) + 1, r);
    upd(first, l, r);
  }
}
const long long inf = 1LL << 60;
int n, k, w[N], g[N];
long long sum[N], suf[N], val[N];
void build(int first, int l, int r) {
  if (l == r)
    T[first].mxs = suf[l], T[first].mncs = -suf[l], T[first].rs = inf;
  else
    build((first << 1), l, ((l + r) >> 1)),
        build(((first << 1) | 1), ((l + r) >> 1) + 1, r), upd(first, l, r);
}
vector<int> son[N];
int nxt[N], go[N][20];
long long f[N][20];
void init() {
  for (int i = 1; i <= n - 1; i++) sum[i] = sum[i - 1] + g[i] - w[i];
  static int st[N];
  int top = 0;
  fill(nxt + 1, nxt + n + 1, n);
  for (int i = 1; i <= n - 1; i++) {
    while (top && sum[st[top]] > sum[i]) nxt[st[top--]] = i;
    st[++top] = i;
  }
  for (int i = 1; i <= n; i++) suf[i] = suf[i - 1] - w[i - 1] + g[i];
  for (int i = 1; i <= n; i++) val[i] = (nxt[i] < n) ? sum[i] - sum[nxt[i]] : 0;
  for (int i = 1; i <= n - 1; i++) son[nxt[i]].push_back(i);
  for (int i = 1; i <= n - 1; i++) go[i][0] = nxt[i], f[i][0] = val[i];
  for (int j = 1; j <= 16; j++)
    for (int i = 1; i <= n - 1; i++)
      go[i][j] = go[go[i][j - 1]][j - 1],
      f[i][j] = f[i][j - 1] + f[go[i][j - 1]][j - 1];
}
int ans = 1;
long long mx(int first, int l, int r) {
  push(first, l, r);
  if (a <= l && r <= b)
    return T[first].mxs;
  else
    return max(
        (a <= ((l + r) >> 1) ? mx((first << 1), l, ((l + r) >> 1)) : -inf),
        (b > ((l + r) >> 1) ? mx(((first << 1) | 1), ((l + r) >> 1) + 1, r)
                            : -inf));
}
int qry(int first, int l, int r, long long second) {
  push(first, l, r);
  if (a <= l && r <= b) {
    if (cal(first, l, r, second) > k) return 0;
    if (l == r)
      return l;
    else {
      push((first << 1), l, ((l + r) >> 1)),
          push(((first << 1) | 1), ((l + r) >> 1) + 1, r);
      int t = qry(((first << 1) | 1), ((l + r) >> 1) + 1, r,
                  max(second, T[(first << 1)].mxs));
      if (t)
        return t;
      else
        return qry((first << 1), l, ((l + r) >> 1), second);
    }
  } else {
    if (b > ((l + r) >> 1)) {
      long long y1 = max(
          (a <= ((l + r) >> 1)) ? mx((first << 1), l, ((l + r) >> 1)) : -inf,
          second);
      int t = qry(((first << 1) | 1), ((l + r) >> 1) + 1, r, y1);
      if (t) return t;
    }
    if (a <= ((l + r) >> 1)) {
      int t = qry((first << 1), l, ((l + r) >> 1), second);
      return t;
    }
    return 0;
  }
}
int mxr(int first) {
  long long cost = 0;
  for (int j = 16; j >= 0; j--)
    if (go[first][j] && cost + f[first][j] <= k)
      cost += f[first][j], first = go[first][j];
  if (first < n) first = nxt[first];
  return first;
}
void dfs(int first) {
  if (nxt[first] < n) a = nxt[first], b = n, c = val[first], add(1, 1, n);
  if (first < n) {
    int t1 = mxr(first);
    a = first + 1, b = t1;
    int t = qry(1, 1, n, -inf);
    if (t) ans = max(ans, t - first);
  }
  int len = son[first].size();
  for (int i = 0; i < len; i++) dfs(son[first][i]);
  if (nxt[first] < n) a = nxt[first], b = n, c = -val[first], add(1, 1, n);
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n - 1; i++) scanf("%d", w + i);
  for (int i = 1; i <= n; i++) scanf("%d", g + i);
  n++;
  for (int i = n; i >= 2; i--) g[i] = g[i - 1];
  for (int i = n - 1; i >= 2; i--) w[i] = w[i - 1];
  g[1] = 0, w[1] = k + 1;
  init(), build(1, 1, n);
  dfs(n);
  printf("%d\n", ans);
  return 0;
}