#include <bits/stdc++.h>
using namespace std;
long long int arr[1000005];
long long int ans[1000005];
int main() {
  memset(ans, 0, sizeof ans);
  ans[0] = 1;
  long long int res = 0;
  long long int n;
  scanf("%lld", &n);
  for (long long int i = 1; i <= n; i++) {
    scanf("%lld", &arr[i]);
  }
  for (long long int i = 1; i <= n; i++) {
    long long int sq = sqrt(arr[i]);
    for (long long int j = min(sq, i); j >= 1; j--) {
      if (arr[i] % j == 0) {
        long long int add = ans[j - 1];
        res += ans[j - 1];
        res = res % 1000000007;
        long long int sec = arr[i] / j;
        if (sec != j) {
          long long int add2 = ans[sec - 1];
          res += add2;
          res = res % 1000000007;
          ans[sec] += add2;
          ans[sec] %= 1000000007;
        }
        ans[j] += add;
        ans[j] %= 1000000007;
      }
    }
  }
  res = res % 1000000007;
  printf("%lld\n", res);
  return 0;
}
