#include <iostream>
#include <algorithm>
using namespace std;
const int N = 1E5 + 10;
int a[N];
int gcd(int n, int m){
return m == 0 ? n : gcd(m, n % m);
}
int main(){
int n; cin >> n;
for(int i = 0; i < n; i ++ ) cin >> a[i];
sort(a, a + n);
int res = a[1] - a[0];
for(int i = 2; i < n; i ++ ){
res = gcd(res, a[i] - a[i - 1]);
}
if(res == 0) cout << n << endl;
else cout << (a[n - 1] - a[0]) / res + 1 << endl;
return 0;
}