#include <bits/stdc++.h>
using namespace std;
void myassert(bool expr) {
  if (!expr) abort();
}
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> nums(n);
  for (int &i : nums) cin >> i;
  sort(nums.begin(), nums.end());
  int gc = nums[1] - nums[0];
  for (int i = 2; i < n; i++) gc = gcd(gc, nums[i] - nums[i - 1]);
  int64_t ans = 0;
  for (int i = 1; i < n; i++)
    ans += (int64_t(nums[i] - nums[i - 1]) / int64_t(gc)) - 1LL;
  cout << ans;
  return 0;
}
