#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long dp[1000010];
vector<int> v, p;
int main() {
  int n, x;
  scanf("%d", &n);
  dp[0] = 1;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    v.clear(), p.clear();
    for (int j = 1; j * j <= x; j++) {
      if (j * j == x)
        v.push_back(j);
      else if (x % j == 0) {
        v.push_back(j);
        p.push_back(x / j);
      }
    }
    for (int j : p) {
      dp[j] += dp[j - 1];
      dp[j] %= mod;
    }
    for (int j = v.size() - 1; j >= 0; j--) {
      dp[v[j]] += dp[v[j] - 1];
      dp[v[j]] %= mod;
    }
  }
  for (int i = 2; i <= n; i++) dp[i] += dp[i - 1], dp[i] %= mod;
  cout << dp[n] << endl;
  return 0;
}
