#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, ans;
int a[MAXN];
int Read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x * 10) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
void Put1(int x) {
  if (x > 9) Put1(x / 10);
  putchar(x % 10 ^ 48);
}
void Put(int x, char c = -1) {
  if (x < 0) putchar('-'), x = -x;
  Put1(x);
  if (c >= 0) putchar(c);
}
template <typename T>
T Max(T x, T y) {
  return x > y ? x : y;
}
template <typename T>
T Min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T Abs(T x) {
  return x < 0 ? -x : x;
}
int gcd(int x, int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
int main() {
  n = Read();
  for (int i = 1; i <= n; ++i) a[i] = Read();
  sort(a + 1, a + n + 1);
  int D = gcd(a[2] - a[1], a[3] - a[2]);
  for (int i = 4; i <= n; ++i) D = gcd(D, a[i] - a[i - 1]);
  for (int i = 2; i <= n; ++i) ans += (a[i] - a[i - 1]) / D - 1;
  Put(ans);
  return 0;
}
