#include <bits/stdc++.h>
using namespace std;
long long int arr[3000000], a[3000000];
vector<long long int> v;
int main() {
  long long int n, ans = 0;
  cin >> n;
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  a[0] = 1;
  for (long long int i = 0; i < n; i++) {
    v.clear();
    for (long long int j = 1; j * j <= arr[i]; j++) {
      if (arr[i] % j == 0) {
        v.push_back(j);
        if (j != arr[i] / j) v.push_back(arr[i] / j);
      }
    }
    sort(v.begin(), v.end());
    for (long long int j = v.size() - 1; j >= 0; j--) {
      a[v[j]] = (a[v[j]] % 1000000007 + a[v[j] - 1] % 1000000007) % 1000000007;
    }
  }
  for (int i = 1; i <= 1800000; i++) {
    ans = (ans % 1000000007 + a[i] % 1000000007) % 1000000007;
    ans = (ans % 1000000007 + 1000000007) % 1000000007;
  }
  cout << ans << "\n";
}
