#include <bits/stdc++.h>
const int N = static_cast<const int>(1e5 + 10);
const int64_t MOD = static_cast<const int64_t>(1e9 + 7);
int n, a[N], ans[N], ret;
std::vector<int> lv, rv;
void process(int i) {
  ans[i] = static_cast<int>((0ll + ans[i - 1] + ans[i]) % MOD);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  ans[0] = 1;
  for (int i = 1; i <= n; i++) {
    lv.clear(), rv.clear();
    for (int j = 1; j * j <= a[i]; j++)
      if (a[i] % j == 0) {
        if (j <= n) lv.push_back(j);
        if (a[i] / j > j && a[i] / j <= n) rv.push_back(a[i] / j);
      }
    for (int j : rv) process(j);
    for (auto it = lv.rbegin(); it != lv.rend(); it++) process(*it);
  }
  for (int i = 1; i <= n; i++)
    ret = static_cast<int>((0ll + ret + ans[i]) % MOD);
  printf("%d\n", ret);
}
