#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long a[maxn + 5], b[maxn + 5];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  sort(a + 1, a + 1 + n);
  long long minn = a[2] - a[1], ans = 0LL;
  for (int i = 2; i <= n; i++) {
    b[i] = a[i] - a[i - 1];
    minn = gcd(minn, b[i]);
  }
  for (int i = 2; i <= n; i++) {
    if (b[i] == minn) continue;
    ans += b[i] / minn - 1;
  }
  printf("%lld\n", ans);
  return 0;
}
