#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7, maxn = 1e6 + 3;
long long n, v[maxn], ans, p;
long long dp[maxn], dp2[maxn], s[maxn];
int main() {
  scanf("%lld", &n);
  dp[0] = 1;
  for (long long i = 0; i < n; i++) {
    scanf("%lld", &v[i]);
    p = 0;
    for (long long d = 1; d * d <= v[i]; d++) {
      if (v[i] % d == 0) {
        s[p++] = d;
        if (d * d != v[i]) s[p++] = v[i] / d;
      }
    }
    sort(s, s + p);
    for (long long j = 0; j < p; j++) dp2[j] = dp[s[j] - 1];
    for (long long j = 0; j < p; j++) {
      dp[s[j]] += dp2[j];
      if (dp[s[j]] >= mod) dp[s[j]] -= mod;
    }
  }
  for (long long i = 1; i <= 1000000; i++) {
    ans += dp[i];
    if (ans >= mod) ans -= mod;
  }
  printf("%lld", ans);
  return 0;
}
