#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll f, ll s) { return s == 0 ? f : gcd(s, f % s); }
int main() {
  ios::sync_with_stdio(false);
  vector<ll> nums;
  int n;
  cin >> n;
  ll num;
  for (int i = 0; i < n; ++i) {
    cin >> num;
    nums.push_back(num);
  }
  vector<ll> dists;
  ll res = 0;
  sort(nums.begin(), nums.end(), less<ll>());
  for (int i = 0; i < nums.size() - 1; ++i) {
    dists.push_back(nums[i + 1] - nums[i]);
  }
  for (ll i : dists) {
    do {
    } while (0);
  }
  ll div = dists[0];
  for (int i = 1; i < dists.size(); ++i) {
    div = gcd(div, dists[i]);
  }
  do {
  } while (0);
  for (ll num : dists) {
    res += num / div - 1;
  }
  cout << res << endl;
}
