#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int MR = 1e6 + 10;
const int MS = 1e5 + 10;
const int MOD = 1e9 + 7;
vector<int> dv[MS];
int dp[MR];
int main() {
  dp[0] = 1;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (n); ++i) {
    int a;
    scanf("%d", &a);
    if (a == 1) {
      dv[i].push_back(a);
      continue;
    }
    int lim = sqrt(a);
    vector<int> tmp;
    dv[i].push_back(1);
    tmp.push_back(a);
    for (int d = (2); d <= (lim); ++d)
      if (a % d == 0) {
        dv[i].push_back(d);
        if (a / d != d) tmp.push_back(a / d);
      }
    while (!tmp.empty()) {
      dv[i].push_back(tmp.back());
      tmp.pop_back();
    }
  }
  for (int i = 0; i < (n); ++i)
    for (int j = (dv[i].size()) - 1; j >= (0); --j) {
      int d = dv[i][j];
      dp[d] = (dp[d] + dp[d - 1]) % MOD;
    }
  int res = 0;
  for (int i = (1); i < (MR); ++i) res = (res + dp[i]) % MOD;
  printf("%d\n", res);
  return 0;
}
