#include <bits/stdc++.h>
using namespace std;
int n, a[2000000], l, b[2000000];
long long f[2000000], ans, mod;
int main() {
  scanf("%d", &n);
  mod = 1e9 + 7;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  f[0] = 1;
  for (int i = 1; i <= n; i++) {
    l = 0;
    for (int j = sqrt(a[i]); j >= 1; j--)
      if (a[i] % j == 0) {
        b[++l] = j;
        if (j != a[i] / j) b[++l] = a[i] / j;
      }
    sort(b + 1, b + l + 1);
    for (int j = l; j >= 1; j--) f[b[j]] = (f[b[j]] + f[b[j] - 1]) % mod;
  }
  for (int i = 1; i <= n; i++) ans = (ans + f[i]) % mod;
  printf("%lld\n", ans);
}
