#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (x == 0) return y;
  return gcd(y % x, x);
}
int main() {
  long long n;
  scanf("%lld", &n);
  long long a[n];
  for (long long i = 0; i < n; i++) scanf("%lld", &a[i]);
  sort(a, a + n);
  long long diff[n];
  for (long long i = 1; i < n; i++) {
    diff[i - 1] = a[i] - a[i - 1];
  }
  long long g = diff[0];
  for (long long i = 1; i < n - 1; i++) {
    g = gcd(g, diff[i]);
  }
  long long ans = 0;
  for (long long i = 0; i < n - 1; i++) {
    ans += (diff[i] / g - 1);
  }
  printf("%lld", ans);
}
