题目描述
There are n points on a straight line, and the i-th point among them is located at xi. All these coordinates are distinct.
Determine the number m — the smallest number of points you should add on the line to make the distances between all neighboring points equal.
Input
The first line contains a single integer n (3 ≤ n ≤ 100 000) — the number of points.
The second line contains a sequence of integers x1, x2, ..., xn ( - 109 ≤ xi ≤ 109) — the coordinates of the points. All these coordinates are distinct. The points can be given in an arbitrary order.
Output
Print a single integer m — the smallest number of points you should add on the line to make the distances between all neighboring points equal.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
样例输出
提示
In the first example you can add one point with coordinate 0.
In the second example the distances between all neighboring points are already equal, so you shouldn't add anything.