#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[111111];
long long cnt[1111111], qidx;
pair<long long, long long> q[10001];
const long long mod = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  long long ans = n;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    qidx = 0;
    for (long long j = 1; j * j <= a[i]; ++j) {
      if ((a[i] % j) == 0) {
        if (j * j == a[i]) {
          if (cnt[j - 1]) {
            ans += cnt[j - 1];
            q[qidx++] = {j, cnt[j - 1]};
          }
        } else {
          if (cnt[j - 1]) {
            ans += cnt[j - 1];
            q[qidx++] = {j, cnt[j - 1]};
          }
          if (cnt[a[i] / j - 1]) {
            ans += cnt[a[i] / j - 1];
            q[qidx++] = {a[i] / j, cnt[a[i] / j - 1]};
          }
        }
        ans %= mod;
      }
    }
    for (long long j = 0; j < qidx; ++j) {
      cnt[q[j].first] += q[j].second;
      cnt[q[j].first] %= mod;
    }
    cnt[1]++;
    ans %= mod;
  }
  cout << (ans % mod) << '\n';
  return 0;
}
