시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 5 2 2 40.000%

문제

Joe is a skilled programmer. The management of the highway police division wants to control the traffic on the highway, and hired him to solve the following problem. There are some fixed control points on the highway. The highway police division wants to place specialized devices to record information from all the control points. Such a device is very expensive and unfortunately can cover an interval of only one meter (including the left endpoint and excluding the right endpoint). The management wants to place the minimum number of devices to cover all the control points. Joe must find an efficient solution.

입력

The program input is from a text file. Each data set in the file stands for a particular configuration of control points. A data set starts with the number n (n  100000) – the number of control points, followed by the real values in ascending order describing the coordinates of the control points (the highway is considered a real line). The coordinates are expressed in meters. White spaces can occur freely in the input. The input data terminate with an end of file.

출력

For each set of data the program has to print the minimum number of devices needed to cover all the control points to the standard output.

예제 입력

2
3.56 4
3
1 2 2.9

예제 출력

1
2

힌트