#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long dp[100005];
list<long long> getlist(long long a) {
  list<long long> list;
  for (int j = sqrt(a); j > 0; j--) {
    if (a % j == 0) {
      list.push_front(j);
      if (j != a / j) list.push_back(a / j);
    }
  }
  return list;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  dp[0] = 1;
  for (int i = 1; i <= n; i++) {
    list<long long> list = getlist(a[i]);
    while (!list.empty()) {
      if (list.back() <= i) {
        dp[list.back()] += dp[list.back() - 1];
        dp[list.back()] %= 1000000007;
      }
      list.pop_back();
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += dp[i];
    ans %= 1000000007;
  }
  cout << (ans) << endl;
}
