#include <bits/stdc++.h>
using namespace std;
int max_(int x, int y) { return x > y ? x : y; }
int gcd(int x, int y) { return x % y ? gcd(y, x % y) : y; }
int n, s, k, maxx = -1, i, a[100001];
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  for (i = 2; i <= n; i++) k = gcd(k, a[i] - a[i - 1]);
  for (i = 2; i <= n; i++)
    if (a[i] - a[i - 1] >= k) s += (a[i] - a[i - 1]) / k - 1;
  printf("%d", s);
  return 0;
}
