#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long b[100005];
int main() {
  int f(int a, int b);
  long long maxn;
  int n, s = 1;
  scanf("%d", &n);
  for (int ni = 0; ni < n; ni++) scanf("%lld", &a[ni]);
  sort(a, a + n);
  for (int mi = 0; mi < n - 1; mi++) b[mi] = a[mi + 1] - a[mi];
  sort(b, b + n - 1);
  maxn = b[0];
  for (int ni = 1; ni < n - 1; ni++) maxn = f(maxn, b[ni]);
  s = (a[n - 1] - a[0]) / maxn + 1 - n;
  printf("%d", s);
  return 0;
}
int f(int a, int b) {
  int r, t;
  if (a < b) {
    t = a;
    a = b;
    b = t;
  }
  while (a % b != 0) {
    r = a;
    a = b;
    b = r % b;
  }
  return b;
}
