#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long findGCD(vector<long long> arr) {
  long long result = arr[0];
  for (long long i = 1; i < arr.size(); i++) result = gcd(arr[i], result);
  return result;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v[i] = x;
  }
  sort(v.begin(), v.end());
  vector<long long> s(n - 1);
  for (long long i = 0; i < n - 1; i++) {
    s[i] = v[i + 1] - v[i];
  }
  long long min = INT_MAX;
  for (long long i = 0; i < n - 1; i++) {
    if (s[i] < min) min = s[i];
  }
  int e = 0;
  for (long long i = 0; i < n - 1; i++) {
    if (s[i] % min != 0) {
      e = 1;
      break;
    }
  }
  long long c = 0;
  if (e == 0) {
    for (long long i = 0; i < n - 1; i++) {
      if (s[i] != min) c = c + (s[i] / min) - 1;
    }
    cout << c;
  } else {
    long long f = findGCD(s);
    for (long long i = 0; i < n - 1; i++) {
      c = c + (s[i] / f) - 1;
    }
    cout << c;
  }
  return 0;
}
