#include <bits/stdc++.h>
using namespace std;
long long int gcdd(long long int a, long long int b) {
  if (a == 1 || b == 1) return 1;
  if (max(a, b) % min(a, b) == 0) return min(a, b);
  return gcdd(max(a, b) % min(a, b), min(a, b));
}
int main() {
  long long int m;
  cin >> m;
  vector<long long int> x;
  long long int q;
  for (long long int i = 0; i < m; i++) {
    cin >> q;
    x.push_back(q);
  }
  sort(x.begin(), x.end());
  long long int gcd = x[1] - x[0];
  for (long long int i = 1; i < m; i++) {
    gcd = gcdd(gcd, x[i] - x[i - 1]);
  }
  long long int sum = 0;
  for (long long int i = 1; i < m; i++) {
    sum += (x[i] - x[i - 1]) / gcd - 1;
  }
  cout << sum;
  return 0;
}
