#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int N = 1e6 + 13;
int t[N];
void build() {
  for (int i = 2; i < N; i++) {
    if (t[i] == 0) {
      for (int j = i; j < N; j += i) {
        if (t[j] == 0) {
          t[j] = i;
        }
      }
    }
  }
}
int n;
vector<long long> b;
vector<pair<long long, long long>> cur;
vector<int> c;
void calc(long long x) {
  cur.clear();
  while (x != 1) {
    int y = t[x];
    int cnt = 0;
    while (x % y == 0) {
      x /= y;
      cnt++;
    }
    cur.push_back({y, cnt});
  }
}
long long x = 1;
void go(int it) {
  if (x > n) {
    return;
  }
  if (it == cur.size()) {
    c.push_back(x);
    return;
  }
  for (int j = 0; j < cur[it].second; j++) {
    x *= cur[it].first;
  }
  for (int j = 0; j < cur[it].second; j++) {
    go(it + 1);
    x /= cur[it].first;
  }
  go(it + 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int _ = 1;
  while (_--) {
    build();
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    b.resize(n + 1);
    b[0] = 1;
    for (int i = 0; i < n; i++) {
      c.clear();
      calc(a[i]);
      x = 1;
      go(0);
      sort(c.rbegin(), c.rend());
      for (int i = 0; i < c.size(); i++) {
        b[c[i]] = (b[c[i]] + b[c[i] - 1]) % M;
      }
    }
    long long s = 0;
    for (int i = 1; i <= n; i++) {
      s = (s + b[i]) % M;
    }
    cout << s << endl;
  }
}
