#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vii = V<int>;
using vvll = V<vll>;
using vvii = V<V<int> >;
using PII = P<int, int>;
using PLL = P<ll, ll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class A, class B>
ostream& operator<<(ostream& out, const P<A, B>& p) {
  return out << '(' << p.first << ", " << p.second << ')';
}
template <class A>
ostream& operator<<(ostream& out, const V<A>& v) {
  out << '[';
  for (int i = 0; i < int(v.size()); i++) {
    if (i) out << ", ";
    out << v[i];
  }
  return out << ']';
}
template <class A, class B>
istream& operator>>(istream& in, P<A, B>& p) {
  return in >> p.first >> p.second;
}
template <class A>
istream& operator>>(istream& in, V<A>& v) {
  for (int i = 0; i < int(v.size()); i++) in >> v[i];
  return in;
}
const long long MOD = 1000000007;
const long long HIGHINF = (long long)1e18;
const int INF = (int)1e9;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vii a(n);
  cin >> a;
  vll dp(1000001, 0);
  dp[0] = 1;
  for (ll i = 0; i < n; i++) {
    vii div;
    for (int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        div.emplace_back(j);
        if (a[i] / j != j) div.emplace_back(a[i] / j);
      }
    }
    sort(div.begin(), div.end());
    reverse(div.begin(), div.end());
    for (auto d : div) {
      dp[d] += dp[d - 1];
      if (dp[d] >= MOD) dp[d] -= MOD;
    }
  }
  ll ans = 0;
  for (auto d : dp) {
    ans += d;
    if (ans >= MOD) ans -= MOD;
  }
  ans -= dp[0];
  if (ans < 0) ans += MOD;
  cout << ans << '\n';
  return 0;
}
