#include <bits/stdc++.h>
using namespace std;
int n, a[100009];
int main() {
	scanf("%d", &n);
	for(int i = 0; i < n; i++) scanf("%d", &a[i]);
	int r = 1; long long ret = 0;
	for(int i = 0; i < n; i++) {
		if((a[i] - 1) >= r) ret += (a[i] - 1) / r, a[i] = 1;
		r = max(r, a[i] + 1);
	}
	printf("%lld\n", ret);
	return 0;
}