#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int N = (int)1e6 + 7, mod = 1000000007, M = 2e9;
int n, a[N], mx, t;
vector<int> f[N];
long long ans, c[N], tmp[N];
long long moding(long long x) {
  if (x >= mod) x %= mod;
  return x;
}
void fac(int x) {
  for (int i = 1; i * i <= a[x]; i++) {
    if (a[x] % i == 0) {
      f[x].push_back(i);
      if (i * i != a[x]) f[x].push_back(a[x] / i);
    }
  }
  sort(f[x].begin(), f[x].end());
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    fac(i);
  }
  c[0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j : f[i]) {
      if (!c[j - 1]) break;
      mx = j;
      ans = moding(ans + c[j - 1]);
      tmp[j - 1] = c[j - 1];
    }
    for (int j : f[i]) {
      if (j > mx) break;
      c[j] = moding(c[j] + tmp[j - 1]);
    }
  }
  cout << moding(ans);
  return 0;
}
