#include <bits/stdc++.h>
using namespace std;
int cnt[1000006];
int main() {
  int n;
  cin >> n;
  cnt[0] = 1;
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    vector<int> v;
    for (int j = 1; j * j <= a; j++) {
      if (a % j) continue;
      v.push_back(j);
      if (j != a / j) {
        v.push_back(a / j);
      }
    }
    sort(v.begin(), v.end(), greater<int>());
    for (auto x : v) {
      cnt[x] = (cnt[x] + cnt[x - 1]) % 1000000007;
    }
  }
  int res = 0;
  for (int i = 1; i <= n; i++) {
    res = (res + cnt[i]) % 1000000007;
  }
  cout << res;
  return 0;
}
