#include <iostream>

using namespace std;

const int MAXN = 100010;
int a[MAXN];

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	int min = 1;
	long long res = 0;
	for (int i = 0; i < n; i++)
	{
		if (a[i] < min)
			continue;
		if (a[i] == min)
		{
			min++;
			continue;
		}
		res += (a[i] - 1) / min;
		min = max(min, 2);
	}
	cout << res << endl;
}