#include <bits/stdc++.h>
using namespace std;
long long int good[1000010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    long long int n, i, j, ans = 0;
    cin >> n;
    long long int a[n];
    good[0] = 1;
    for (i = 0; i < n; i++) {
      cin >> a[i];
      vector<long long int> factors;
      for (j = 1; j * j <= a[i]; j++) {
        if (a[i] % j == 0) {
          factors.push_back(j);
          if (a[i] / j != j) factors.push_back(a[i] / j);
        }
      }
      sort(factors.begin(), factors.end());
      reverse(factors.begin(), factors.end());
      for (j = 0; j < factors.size(); j++)
        good[factors[j]] =
            (good[factors[j]] + good[factors[j] - 1]) % 1000000007;
    }
    for (i = 1; i <= n; i++) ans = (ans + good[i]) % 1000000007;
    cout << ans;
  }
  return 0;
}
