import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int min=0;
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
int[] a = new int[number];
int length = a.length-1;
for(int j = 0;j<number;j++) a[j] = sc.nextInt();
//排序后的数组
sort(a, 0, length);
//特殊情况
if(a[0] == a[length]) System.out.println(number);
else {
//求最小的公倍数
for(int k =1;k<length+1;k++)
min = gcd(min, a[k]-a[k-1]);
System.out.println((a[length]-a[0])/min+1);
}
}
//快速排序
static void sort(int[] num, int left, int right){
if(left>right)return;
int i,j,temp,t;
i = left;
j = right;
//temp为基准位
temp = num[left];
while(i<j){
//先右边
while(temp<=num[j]&&i<j)j--;
//再左边
while(temp>=num[i]&&i<j)i++;
//如果满足条件则交换
if (i<j) {
t = num[j];
num[j] = num[i];
num[i] = t;
}
}
//最后将基准为与i和j相等位置的数字交换
num[left] = num[i];
num[i] = temp;
//递归调用左半数组
sort(num, left, j-1);
//递归调用右半数组
sort(num, j+1, right);
}
static int gcd(int a, int b){
if(b==0)return a;
return gcd(b, a % b) ;
}
}