#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000000 + 7;
vector<pair<int, int>> f[100000 + 1];
vector<int> a(100000);
int n;
void add(int index, int mult) {
  if (mult > n) return;
  f[mult].push_back(make_pair(index, 0));
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    for (int j = 1; j * j <= a[i]; ++j)
      if (a[i] % j == 0) {
        add(i, j);
        if (a[i] / j != j) add(i, a[i] / j);
      }
  }
  long long result = n;
  for (int i = 0; i < f[1].size(); ++i) f[1][i].second = 1;
  for (int step = 2; step <= n; ++step) {
    int p1 = 0, p2 = 0;
    long long accum = 0;
    while (p2 < f[step].size()) {
      while (p1 < f[step - 1].size() &&
             f[step - 1][p1].first < f[step][p2].first) {
        accum = (accum + f[step - 1][p1].second) % mod;
        p1++;
      }
      result = (result + accum) % mod;
      f[step][p2].second = accum;
      p2++;
    }
  }
  cout << result << endl;
  return 0;
}
