#include <bits/stdc++.h>
using namespace std;
long long atoll1(string a) {
  long long n = a.size();
  long long i = n - 1, i1 = 1;
  long long ans = 0;
  while (i >= 0) {
    ans += ((long long)a[i] - 48) * i1;
    i1 *= 10;
    i--;
  }
  return ans;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n, a[100005];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  vector<int> x;
  for (int i = 1; i < n; i++) x.push_back(a[i] - a[i - 1]);
  int g = x[0];
  for (int i = 1; i < x.size(); i++) {
    g = gcd(g, x[i]);
  }
  int ans = 0;
  for (int i = 0; i < x.size(); i++) ans += x[i] / g - 1;
  cout << ans;
  return 0;
}
