#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7, MOD = 1e9 + 7;
int a[N], f[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  f[0] = 1;
  for (int i = 1; i <= n; ++i) {
    vector<int> p;
    for (int j = 1; j <= a[i] / j; j++) {
      if (a[i] % j) continue;
      p.push_back(j);
      if (j * j != a[i]) p.push_back(a[i] / j);
    }
    sort(p.begin(), p.end());
    for (int j = p.size() - 1; j >= 0; --j)
      f[p[j]] = (f[p[j]] + f[p[j] - 1]) % MOD;
  }
  long long res = 0;
  for (int i = 1; i <= n; ++i) res = (res + f[i]) % MOD;
  printf("%lld\n", res);
  return 0;
}
