#include <bits/stdc++.h>
#pragma optimization_level 3
using namespace std;
vector<long long> a;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long aa;
    cin >> aa;
    a.push_back(aa);
  }
  sort(a.begin(), a.end());
  long long g = 0;
  vector<long long> v;
  for (int i = 1; i < n; i++) {
    v.push_back(a[i] - a[i - 1]);
  }
  g = gcd(v[0], v[1]);
  for (int i = 2; i < v.size(); i++) {
    g = gcd(g, v[i]);
  }
  long long cnt = 0;
  for (int i = 0; i < v.size(); i++) {
    cnt += (v[i] / g) - 1;
  }
  cout << cnt;
  return 0;
}
