#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 20;
const long long M = 1e9 + 7;
int n, a[N];
vector<int> vc;
vector<long long> w;
long long s[N];
void get(int x) {
  vc.clear();
  for (int i = 1; (long long)i * i <= x; i++) {
    if (x % i != 0) continue;
    vc.push_back(i);
    if (i * i != x) vc.push_back(x / i);
  }
}
int main() {
  scanf("%d", &n);
  long long ans = 0;
  s[0] = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    get(a[i]);
    w.clear();
    for (int j = 0; j < vc.size(); j++) {
      int x = vc[j];
      ans += s[x - 1];
      ans %= M;
      w.push_back(s[x - 1]);
    }
    for (int j = 0; j < vc.size(); j++) {
      int x = vc[j];
      s[x] = (s[x] + w[j]) % M;
    }
  }
  printf("%lld\n", ans);
}
