#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int> A(N);
	for (auto& x : A) cin >> x;
	int y = 1;
	long long r = 0;
	for (int x : A) {
		int n = (x-1) / y;
		//cerr << x << " " << y << " " << n << endl;
		r += n;
		if (y == 1) {
			y = 2;
		} else {
			if (n == 0 && x == y) ++ y;
		}
	}
	cout << r << endl;
}
