#include <bits/stdc++.h>
using namespace std;
int n, a[100005], d;
int main() {
cin >> n;
for (int i = 0; i < n; ++i) cin >> a[i];
sort(a, a + n);
d = a[1] - a[0];
for (int i = 1; i < n - 1; ++i) d = __gcd(d, a[i + 1] - a[i]);
if (d == 0) cout << n << endl;
else cout << (a[n - 1] - a[0]) / d + 1 << endl;
return 0;
}