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