Domino

No attempts yetTime limit1sMemory limit128 MB

Problem

Jaś is setting up dominoes, but not in the traditional way; he plays by toppling one tile after another. His tiles all have different heights. He placed nn dominoes in a row so that toppling any tile makes the next tile in the row topple as well. A tile topples the next one exactly when the height of the toppling tile is greater than the distance between them. Jaś wants to know the maximum number of unnecessary tiles he can remove from the row so that toppling the first tile still makes the last tile topple (through the intermediate tiles falling in turn). Jaś may not change the positions of the tiles.

Input

The first line contains the number of tiles nn (1n1061 \le n \le 10^6). The second line contains nn integers w1,w2,,wnw_1, w_2, \ldots, w_n (1wi1091 \le w_i \le 10^9), where wiw_i is the height of the ii-th tile in the row. The third line contains n1n-1 integers x1,x2,,xn1x_1, x_2, \ldots, x_{n-1} (1xi1091 \le x_i \le 10^9), where xix_i is the distance between the ii-th and the (i+1)(i+1)-th tile. In the initial arrangement each tile can topple its immediate neighbor, that is wi>xiw_i > x_i for every i<ni < n.

Output

Print a single integer: the maximum number of tiles that can be removed from the row.