#include <bits/stdc++.h>
using namespace std;
long long a[1000005], dp[1000005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  dp[0] = 1;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    vector<long long> v;
    for (long long j = 1; j * j <= 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 k = 0; k < v.size(); k++) {
      dp[v[k]] += dp[v[k] - 1];
      dp[v[k]] %= 1000000007;
    }
  }
  long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    sum += dp[i];
    sum %= 1000000007;
  }
  cout << sum << endl;
  return 0;
}
