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 void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
const int MAXN = 1e5;
const int INF = 1e9;
const long long LL_INF = 1e16;
int n, g[MAXN + 5], w[MAXN + 5];
long long K, a[MAXN + 5], b[MAXN + 5];
int sta[MAXN + 5], top;
long long val[MAXN + 5], presum_val[MAXN + 5];
struct SegmentTree {
  long long mn[MAXN * 4 + 5], tag[MAXN * 4 + 5];
  long long mn2[MAXN * 4 + 5];
  long long lans[MAXN * 4 + 5];
  void push_down(int p) {
    if (tag[p] != 0) {
      mn[p << 1] += tag[p];
      tag[p << 1] += tag[p];
      lans[p << 1] -= tag[p];
      mn[p << 1 | 1] += tag[p];
      tag[p << 1 | 1] += tag[p];
      lans[p << 1 | 1] -= tag[p];
      tag[p] = 0;
    }
  }
  long long calc(int p, int l, int r, long long right_min) {
    if (l == r) {
      return mn2[p] - min(right_min, mn[p]);
    }
    push_down(p);
    int mid = (l + r) >> 1;
    if (right_min >= mn[p << 1 | 1]) {
      return min(lans[p], calc(p << 1 | 1, mid + 1, r, right_min));
    } else {
      return min(calc(p << 1, l, mid, right_min), mn2[p << 1 | 1] - right_min);
    }
  }
  void push_up(int p, int l, int mid) {
    mn[p] = min(mn[p << 1], mn[p << 1 | 1]);
    lans[p] = calc(p << 1, l, mid, mn[p << 1 | 1]);
  }
  void build(int p, int l, int r) {
    if (l == r) {
      mn[p] = a[l];
      mn2[p] = a[l - 1];
      return;
    }
    int mid = (l + r) >> 1;
    build(p << 1, l, mid);
    build(p << 1 | 1, mid + 1, r);
    mn2[p] = min(mn2[p << 1], mn2[p << 1 | 1]);
    push_up(p, l, mid);
  }
  void range_add(int p, int l, int r, int ql, int qr, long long v) {
    if (ql <= l && qr >= r) {
      mn[p] += v;
      tag[p] += v;
      lans[p] -= v;
      return;
    }
    push_down(p);
    int mid = (l + r) >> 1;
    if (ql <= mid) {
      range_add(p << 1, l, mid, ql, qr, v);
    }
    if (qr > mid) {
      range_add(p << 1 | 1, mid + 1, r, ql, qr, v);
    }
    push_up(p, l, mid);
  }
  int _find(int p, int l, int r, long long right_min, long long v) {
    if (l == r) {
      return l;
    }
    push_down(p);
    int mid = (l + r) >> 1;
    if (calc(p << 1, l, mid, min(right_min, mn[p << 1 | 1])) <= v) {
      return _find(p << 1, l, mid, min(right_min, mn[p << 1 | 1]), v);
    } else {
      return _find(p << 1 | 1, mid + 1, r, right_min, v);
    }
  }
  int find(int p, int l, int r, long long right_min, int ql, int qr,
           long long v) {
    if (ql <= l && qr >= r) {
      if (calc(p, l, r, right_min) <= v) {
        return _find(p, l, r, right_min, v);
      } else {
        return INF;
      }
    }
    push_down(p);
    int mid = (l + r) >> 1;
    int res = INF;
    if (ql <= mid) {
      res = find(p << 1, l, mid, min(right_min, mn[p << 1 | 1]), ql, qr, v);
      if (res != INF) return res;
    }
    if (qr > mid) {
      res = find(p << 1 | 1, mid + 1, r, right_min, ql, qr, v);
    }
    return res;
  }
  SegmentTree() {}
};
SegmentTree T;
int calc(int p, int r) {
  if (sta[p - 1] + 1 > r - 1) {
    return 0;
  }
  long long sum = presum_val[top - 1] - presum_val[p - 1];
  T.range_add(1, 1, n, r, n, LL_INF);
  T.range_add(1, 1, n, sta[p - 1] + 1, r - 1, -presum_val[p - 1]);
  int res = T.find(1, 1, n, LL_INF, sta[p - 1] + 1, r - 1, K - sum);
  T.range_add(1, 1, n, r, n, -LL_INF);
  T.range_add(1, 1, n, sta[p - 1] + 1, r - 1, presum_val[p - 1]);
  return r - res + 1;
}
int main() {
  cin >> n >> K;
  for (int i = 1; i < n; ++i) {
    cin >> w[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> g[i];
  }
  for (int i = 1; i < n; ++i) {
    a[i] = a[i - 1] + g[i] - w[i];
  }
  for (int i = 1; i <= n; ++i) {
    b[i] = b[i - 1] + g[i] - w[i - 1];
  }
  T.build(1, 1, n);
  int ans = 1;
  for (int i = 1; i <= n; ++i) {
    while (top && b[sta[top]] <= b[i]) {
      if (top > 1) {
        T.range_add(1, 1, n, sta[top - 1] + 1, sta[top], -presum_val[top - 1]);
      }
      --top;
    }
    sta[++top] = i;
    if (top > 1) {
      val[top - 1] = b[sta[top - 1]] - b[i];
      presum_val[top - 1] = presum_val[top - 2] + val[top - 1];
      T.range_add(1, 1, n, sta[top - 1] + 1, i, presum_val[top - 1]);
    }
    int l = 1, r = top;
    while (l < r) {
      int mid = (l + r) >> 1;
      if (presum_val[top - 1] - presum_val[mid - 1] <= K) {
        r = mid;
      } else {
        l = mid + 1;
      }
    }
    ckmax(ans, calc(l, i));
  }
  cout << ans << endl;
  return 0;
}