Important Lecture#11771

Important Lecture

1 second
256 megabytes
Easy

Last night you spent preparing for the next contest and now your sleepiness could be described as a number . However today you have minutes of important lecture at the university. But some part of it could be boring and at those minutes your sleepiness will increase by b_i at the end of the minute if you are awake.

If your sleepiness is bigger or equal to you sleep this minute.

Also every minute of lecture has calculated level of noise c_i. If currently you are asleep and level of noise is strictly greater than amount of minutes you have slept (including that minute), then you wake up at the end of the minute and your sleepiness becomes and the sleepiness value of the current minute doesn't affect you.

Write a program, which will calculate number of minutes you have slept, so you could decide whether to go or not.

Input

The first line contains three integers, , and (1 \le n \le 2\cdot10^5), (0 \le k \le 10^9), (1 \le x \le 10^9) — the number of minutes, start sleepiness and value of sleepiness after which you fall asleep.

The second line contains integers b_1, b_2, \dots, b_n (0 \le b_i \le 10^9) — amount of the additional sleepiness.

The third line contains integers c_1, c_2, \dots, c_n (0 \le c_i \le n) — amount of the noise.

Output

Print a single integer — amount of the minutes you will be asleep.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Note

In the first sample after 1 minute you fall asleep, because you already have slept 1 minute, till the end of minute 2 you don't wake up. In the end of 3 minute you have slept 2 minutes, but noise is 4 and it's strictly bigger than 2 so you wake up. And after that your sleepiness will never be bigger or equal to 10. As the result you have slept 2 and 3 minutes.

In the second sample you have slept 2 and 5 minutes.

Scoring

  1. (10 points): n\le 10^3 and k, x, b_i\le 10^5;

  2. (10 points): c_i=0;

  3. (10 points): k < x;

  4. (20 points): no additional constraints.