#include <bits/stdc++.h>
using namespace std;
long long modexp(long long n, long long m) {
  if (m == 0)
    return 1;
  else if (m == 1)
    return n;
  else {
    long long p = modexp(n, m / 2);
    if (m % 2 == 1)
      return (((p * p) % 1000000007) * n) % 1000000007;
    else
      return (p * p) % 1000000007;
  }
}
long long exp(long long n, long long m) {
  if (m == 0) return 1;
  if (m == 1) return n;
  long long p = exp(n, m / 2);
  if (m % 2 == 1)
    return p * p * n;
  else
    return p * p;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long inv(long long n) { return exp(n, 1000000007 - 2); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
long long factorial(long long fact[], long long n) {
  fact[0] = 1;
  fact[1] = 1;
  long long prod = 1, i;
  for (i = 2; i < n + 1; i++) {
    prod = (prod * i) % 1000000007;
    fact[i] = prod;
  }
  return prod;
}
bool comparator(pair<long long, long long> p1, pair<long long, long long> p2) {
  return p1.second > p2.second;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i, j, k, m, t, l, r, h;
  cin >> n;
  vector<long long> a(n), dp(n + 1, 0);
  dp[0] = 1;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n; i++) {
    long long low = 1, high = a[i], ret;
    while (low <= high) {
      long long mid = (low + high) / 2;
      if (mid * mid <= a[i]) {
        ret = mid;
        low = mid + 1;
      } else
        high = mid - 1;
    }
    for (j = ret; j >= 1; j--) {
      if (a[i] % j == 0) {
        if (a[i] / j <= i + 1) {
          dp[a[i] / j] = (dp[a[i] / j] + dp[a[i] / j - 1]) % 1000000007;
        }
        if (j <= i + 1 && a[i] / j != j) {
          dp[j] = (dp[j] + dp[j - 1]) % 1000000007;
        }
      }
    }
  }
  long long ans = 0;
  for (i = 1; i < n + 1; i++) {
    ans = (ans + dp[i]) % 1000000007;
  }
  cout << ans << endl;
  return 0;
}
