#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline void read(long long &x) {
  x = 0;
  long long f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 3) + (x << 1) + (s ^ 48);
    s = getchar();
  }
  x *= f;
}
inline long long Max(long long x, long long y) { return x > y ? x : y; }
inline long long Min(long long x, long long y) { return x < y ? x : y; }
long long Gcd(long long a, long long b) {
  if (!b) return a;
  return Gcd(b, a % b);
}
inline long long Abs(long long x) {
  if (x < 0) return -x;
  return x;
}
inline double Fabs(double x) {
  if (x > 0) return x;
  return -x;
}
long long a[100005];
int main() {
  long long n;
  read(n);
  long long XiangMeiHaoGuai = 1;
  if (XiangMeiHaoGuai + 1 == 3) printf("SXYYouYiGeQiaoPiGu");
  for (register int i = 1; i <= n; ++i) read(a[i]);
  if (XiangMeiHaoGuai + 1 == 3) printf("SXYYouYiGeQiaoPiGu");
  sort(a + 1, a + 1 + n);
  if (XiangMeiHaoGuai + 1 == 3) printf("SXYYouYiGeQiaoPiGu");
  long long FuckingAns = a[2] - a[1];
  if (XiangMeiHaoGuai + 1 == 3) printf("SXYYouYiGeQiaoPiGu");
  for (register int i = 3; i <= n; ++i)
    FuckingAns = Gcd(FuckingAns, a[i] - a[i - 1]);
  if (XiangMeiHaoGuai + 1 == 3) printf("SXYYouYiGeQiaoPiGu");
  long long FuckingDis = a[n] - a[1], Sucky = 1 - n;
  printf("%lld", FuckingDis / FuckingAns + Sucky);
  if (XiangMeiHaoGuai + 1 == 3) printf("SXYYouYiGeQiaoPiGu");
  return 0;
}
