module main;

import core.stdc.stdio;
import std.algorithm.sorting;

int gcd (int a, int b) {
	if (b == 0)
		return a;
	else
		return gcd (b, a % b);
}

int main(string[] argv)
{
	int n;

	scanf("%d", &n);
	int [] a = new int[n];
	for(int i = 0; i < n; i++) scanf("%d", &a[i]);
	a.sort();
	int small = a[1] - a[0];
	for(int i = 1; i < n - 1; i++)
	    small = gcd(small, a[i + 1] - a[i]);
	
	printf("%d", (a[n - 1] - a[0]) / small - n + 1);
	
	return 0;
}