#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<long long> v(n);
  vector<long long> a(n - 1);
  for (size_t i = 0; i < n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  if (v.size() == 1) {
    cout << "0";
    return 0;
  }
  for (size_t i = 1; i < v.size(); i++) {
    a[i - 1] = v[i] - v[i - 1];
  }
  if (a.size() == 1) {
    cout << a[0];
    return 0;
  }
  long long g = gcd(a[0], a[1]);
  for (size_t i = 2; i < a.size(); i++) {
    g = gcd(g, a[i]);
  }
  long long ans = 0;
  for (size_t i = 0; i < a.size(); i++) {
    ans += (a[i] / g) - 1;
  }
  cout << ans;
}
