#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b % a, a);
}
int main() {
  long n;
  cin >> n;
  vector<long long> x(n);
  for (long i = 0; i < n; i++) {
    cin >> x[i];
  }
  sort(x.begin(), x.end());
  for (long i = n - 1; i >= 1; i--) {
    x[i] = x[i] - x[i - 1];
  }
  long long d = 0;
  for (long i = 1; i < n; i++) {
    d = gcd(d, x[i]);
  }
  long long cnt = 0;
  for (long i = 1; i < n; i++) {
    cnt += (x[i] / d) - 1;
  }
  cout << cnt << endl;
}
