#include <bits/stdc++.h>
using namespace std;
long double pi = 4 * atanl(1.0);
long double eps = 1e-9;
string stringmin = "!";
string stringmax = "~";
int cnt = 0;
double ang1 = pi / 180;
pair<long double, long double> operator-(pair<long double, long double> p1,
                                         pair<long double, long double> p2) {
  return pair<long double, long double>(p1.first - p2.first,
                                        p1.second - p2.second);
}
pair<long double, long double> operator+(pair<long double, long double> p1,
                                         pair<long double, long double> p2) {
  return pair<long double, long double>(p1.first + p2.first,
                                        p1.second + p2.second);
}
long double operator*(pair<long double, long double> p1,
                      pair<long double, long double> p2) {
  return p1.first * p2.first + p1.second * p2.second;
}
pair<long double, long double> operator*(long double c,
                                         pair<long double, long double> p) {
  return pair<long double, long double>(c * p.first, c * p.second);
}
long double operator++(pair<long double, long double> p) {
  return sqrtl(p.first * p.first + p.second * p.second);
}
long long gcd(long long a, long long b) {
  while (a < b ? b %= a : a %= b)
    ;
  return a + b;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> vec(n);
  for (auto &i1 : vec) cin >> i1;
  sort(vec.begin(), vec.end());
  vector<long long> vec2;
  for (int i = 0; i < int(vec.size() - 1); ++i)
    vec2.push_back(vec[i + 1] - vec[i]);
  long long g = vec2.front();
  for (auto &i1 : vec2) g = gcd(g, i1);
  long long ans = 0;
  for (auto &i1 : vec2) ans += i1 / g - 1;
  cout << ans;
  return 0;
}
