#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  int a[100005];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int inter = a[1] - a[0];
  for (int i = 2; i < n; i++) {
    inter = gcd(inter, a[i] - a[i - 1]);
  }
  int cnt = 0;
  for (int i = 1; i < n; i++) {
    cnt += (a[i] - a[i - 1]) / inter - 1;
  }
  printf("%d\n", cnt);
}
