#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  vector<int> b(n - 1);
  for (int i = 0; i < n - 1; ++i) {
    b[i] = a[i + 1] - a[i];
  }
  n--;
  int d = b[0];
  for (int i = 0; i < n; ++i) {
    d = gcd(d, b[i]);
  }
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    ans += (b[i] / d) - 1;
  }
  cout << ans;
  return 0;
}
