#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e+9 + 7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
const long long MAXN = 2e+3 + 500;
const long long MAXN1 = 1e+6 + 8;
long long n, a[MAXN1], dp[MAXN1];
int main() {
  cin >> n;
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    vector<long long> v;
    for (int j = 1; j <= sqrt(a[i]); j++) {
      if (a[i] % j == 0) {
        v.push_back(j);
        if (j != a[i] / j) v.push_back(a[i] / j);
      }
    }
    sort(v.begin(), v.end(), greater<long long>());
    for (long long fact : v) dp[fact] = (dp[fact] + dp[fact - 1]) % MOD;
  }
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    res = (res + dp[i]) % MOD;
  }
  cout << res << endl;
}
