#include <bits/stdc++.h>
using namespace std;
int n, a[100009];
long long l = -1, ans;
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  for (int i = 2; i <= n; i++) {
    long long x = abs(a[i] - a[i - 1]);
    if (l == -1)
      l = x;
    else
      l = gcd(l, x);
  }
  for (int i = 2; i <= n; i++) {
    long long x = abs(a[i] - a[i - 1]);
    x /= l;
    ans += (x - 1);
  }
  cout << ans;
}
