Announcements

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

There are NN billboards with announcements near Kyoto University.

The ii-th billboard appears at day S_iS\_i. However, at each TT-th day, all billboards installed before this day are removed. You may assume that, on those days, no new billboards will appear.

Find the minimal number of times you need to visit the university to see each billboard at least once.

입력

The first line of input contains one integer NN (1N21051 \le N \le 2 \cdot 10^5). The second line contains NN integers S_1,S_2,,S_NS\_1, S\_2, \ldots, S\_N. Here, S_iS\_i is the day when the ii-th billboard appears (1S_i1091 \le S\_i \le 10^9). The last line contains one integer TT (2T1092 \le T \le 10^9, S_iS\_i is not divisible by TT for any ii): the interval between successive deletions. This means the billboards are removed on days TT, 2T2T, 3T3T, and so on.

출력

Print one integer: the minimum number of visits you need to do to see each billboard at least once.

힌트

In Example 1, the first two billboards are appearing on days 1 and 2. Then those 2 billboards are removed on day 3. After that, on day 5, the last billboard appears, which is then removed on day 6. So you may visit on day 2 (to see billboards 1 and 2) and on day 5 (to see billboard 3), two times in total.