#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000010;
const int _mod = 1000000007;
int a[maxn];
int dp[maxn];
long long ans = 0;
deque<int> cur;
int main() {
  int n;
  scanf("%d", &n);
  dp[0] = 1;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    cur.clear();
    for (int j = (int)(sqrt(a[i])); j >= 1; j--) {
      if (a[i] % j == 0) {
        cur.push_back(j);
        if (j != a[i] / j) cur.push_front(a[i] / j);
      }
    }
    for (int i = 0; i < (int)cur.size(); i++) {
      dp[cur[i]] += dp[cur[i] - 1];
      dp[cur[i]] %= _mod;
    }
  }
  for (int i = 1; i <= n; i++) ans += dp[i];
  ans %= _mod;
  printf("%lld", ans);
  return 0;
}
