#include <iostream>
#include <vector>
using namespace std;

int main(void) {
    int n;
    cin >> n;
    vector<int> p(n);
    for (int i = 0; i < n; ++ i) {
        cin >> p[i];
    }

    long long ans = p[0] - 1, cc = 2;
    for (int i = 1; i < n; ++ i) {
        ans += p[i] / cc;
        if (p[i] % cc == 0) {
            -- ans;
        }
        if (p[i] == cc) ++ cc;
    }
    cout << ans << endl;

    return 0;
}