#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005];
map<int, int> dp;
int main() {
  ios_base::sync_with_stdio(false);
  ;
  cin.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  dp[0] = 1;
  for (int i = 1; i <= n; i++) {
    vector<int> aux;
    for (int j = 1; j * j <= a[i]; j++) {
      if (j > i) break;
      if (a[i] % j == 0) {
        aux.push_back(j);
        if (j != a[i] / j) aux.push_back(a[i] / j);
      }
    }
    sort(aux.rbegin(), aux.rend());
    for (int j = 0; j < aux.size(); j++) {
      dp[aux[j]] += dp[aux[j] - 1];
      dp[aux[j]] %= 1000000007;
    }
  }
  long long int resp = 0;
  for (int i = 1; i <= n; i++) {
    resp += dp[i];
  }
  resp %= 1000000007;
  cout << resp << "\n";
}
