BRODOVI - BRODOVI

题意翻译

### 题目描述 Mirko 住在一个难得有船经过的有港口的小镇上。然而,直到今天,Mirko 还记得那天所有造访过这个港口的船只都出现了。他用索引 $1$ 表示这一天。 许多天过去了,Mirko 记下了至少有一艘船访问港口的日子,把这些日子命名为娱乐日。 此外,Mirko 注意到每艘船都定期访问港口。例如,长度为 $3$ 的间隔表示某艘船在第 $1$ 天、第 $4$ 天、第 $7$ 天、第 $10$ 天等时间访问港口。 给出 Mirko 的娱乐日列表(包括今天,且今天也是一个娱乐日),计算访问他的港口的最小可能的船只数量。 注:所有娱乐日都出现在 Mirko 的列表上,保证永远存在答案。 ### 输入格式 输入的第 $1$ 行包含一个整数 $N$,即娱乐天的个数。 下面 $N$ 行,每行一个整数 $A_i$ ,表示表上的娱乐天数,按升序排列。第一个和最后一个娱乐天分别是 Mirko 开始监测港口交通的日期和今天。今天将一直出现在列表上。第一个索引总是 $1$。 ### 输出格式 输出共一行,一个整数,为最小的访问 Mirko 的港口的船舶的数量。

题目描述

Mirko lives in a small town with a harbour: once in a blue moon a ship passes by. However, to this day Mirko remembers the day when all the ships who had ever visited the harbour showed up. He denoted this day by index 1. Many days have passed since, but Mirko noted each day when at least one ship visited the harbour, naming these days entertaining. Additionally, Mirko has noticed that each ship visits the harbour periodically, at regular intervals. For instance, an interval of length 3 implies that some ship visited the harbour on days 1, 4, 7, 10 etc. Given Mirko’s list of entertaining days (including today which is considered to be an entertaining day as well), compute the minimum possible number of ships visiting his harbour. Notes: All entertaining days appear on Mirko’s list. It is guaranteed that the given data is consistent - in other words, a solution will always exist.

输入输出格式

输入格式


The first line of input contains an integer N (2

输出格式


The first and only line of output must contain the required minimum number of ships.

输入输出样例

输入样例 #1

5
1
7
10
13
19

输出样例 #1

2