#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000000 + 7;
long long cnt[1000005];
long long fac[1000005];
int n, a[1000005];
int main() {
  while (~scanf("%d", &n)) {
    long long ans = 0;
    cnt[0] = 1;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      int tot = 0;
      int x;
      for (x = 1; x < a[i] / x; x++) {
        if (a[i] % x == 0) {
          fac[tot++] = x;
          fac[tot++] = a[i] / x;
        }
      }
      if (a[i] % x == 0 && x == a[i] / x) fac[tot++] = x;
      sort(fac, fac + tot);
      for (int j = tot - 1; j >= 0; j--) {
        cnt[fac[j]] += cnt[fac[j] - 1];
        cnt[fac[j]] %= mod;
      }
    }
    for (int i = 1; i <= 1000000; i++) {
      ans = (ans + cnt[i]) % mod;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
