//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(n+2,0);
        dp[0]=1;
        for(int i=0;i<n;i++)
        {
          int y;
          cin>>y;
          set<int,greater<int>> s={1,y};
          for(int j=2;j*j<=y;j++)
            if(y%j==0)
              s.insert(j),s.insert(y/j);
          for(auto x:s)
            if(x<=n)dp[x]=(dp[x]+dp[x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(n+2,0);
        dp[0]=1;
        for(int i=0;i<n;i++)
        {
          int y;
          cin>>y;
          set<int,greater<int>> s={1,y};
          if(y%2==0)
            s.insert(2),s.insert(y/2);
          for(int j=3;j*j<=y;j+=2)
            if(y%j==0)
              s.insert(j),s.insert(y/j);
          for(auto x:s)
            if(x<=n)dp[x]=(dp[x]+dp[x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define ll long long int
#define ld long double
using namespace std;
const int N = 1e6 + 1;
const int MOD = 1e9 + 7;

ll ad(ll a, ll b){
    return((a % MOD + b % MOD) % MOD);
}

std::vector<ll> v[N];
ll a[N], h[N], ans[N], n;

void seive(){
  for(int i = 1; i <= n; i++){
      for(int j = i; j < N; j += i){
      	if(h[j])
      		v[j].push_back(i);
      }
  }
}

int main(){
	fast;
	ll x;
	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> x;
		h[x]++;
		a[i] = x;
	}
	seive();
	ans[0] = 1;
	memset(h, 0, sizeof h);
	for(int i = 1; i <= n; i++){
		if(!h[a[i]]){
			reverse(v[a[i]].begin(), v[a[i]].end());
			h[a[i]] = 1;
		}
		for(auto j: v[a[i]]){
			ans[j] = ad(ans[j], ans[j - 1]);
		}
	}
	ll out = 0;
	for(int i = 1; i <= n; i++)
		out = ad(out, ans[i]);
	cout << out;

	return 0;
}


//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(n+2,0);
        vector<vector<int>> s(1000002);
        dp[0]=1;
        for(int i=1;i<=1000000;i++)
          for(int j=i;j<=1000000;j+=i)
            s[j].eb(i);
        for(int i=0;i<n;i++)
        {
          int y;
          cin>>y;
          for(auto x=s[y].rbegin();x!=s[y].rend();x++)
            if(*x<=n)dp[*x]=(dp[*x]+dp[*x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(100002,0);
        dp[0]=1;
        for(int i=0;i<n;i++)
        {
          int y;
          cin>>y;
          set<int,greater<int>> s;
          for(int j=1;j*j<=y;j++)
            if(y%j==0)
              s.insert(j),s.insert(y/j);
          for(auto x:s)
            if(x<=n)dp[x]=(dp[x]+dp[x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
//#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(n+2,0);
        dp[0]=1;
        for(int i=0;i<n;i++)
        {
          int y;
          cin>>y;
          set<int,greater<int>> s={1,y};
          for(int j=2;j*j<=y;j++)
            if(y%j==0)
              s.insert(j),s.insert(y/j);
          for(auto x:s)
            if(x<=n)dp[x]=(0LL+dp[x]+dp[x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(0LL+ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(n+2,0);
        dp[0]=1;
        for(int i=1;i<=n;i++)
        {
          int y;
          cin>>y;
          vector<int> v;
          for(int j=1;j*j<=y;j++)
            if(y%j==0)
              {
                int d=y/j;
                if(d!=j)
                  {
                    if(j<=i)v.eb(j);
                    else break;
                    if(d<=i)v.eb(d);
                  }
                else
                  if(j<=i)
                    v.eb(j);
                  else
                    break;
              }
          sort(v.rbegin(),v.rend());
          for(auto x:v)
            if(x<=n)dp[x]=(dp[x]+dp[x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


//Don't fear to fall, the more you fall the better you become at not falling
#include<bits/stdc++.h>
using namespace std;

#define xlr8 ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
//#define int long long int
#define ld long double
#define mod 1000000007
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define nl "\n"
#define ignore cin.ignore(numeric_limits<streamsize>::max(),'\n')

const int dx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

int power(int a,int b,int m=mod){ int ans=1; a=a%m;  while(b>0) {  if(b&1)  ans=(1LL*a*ans)%m; b>>=1;a=(1LL*a*a)%m;}return ans;}
int ncr(int n,int r){ int res=1; if(r>n-r)r=n-r; for(int i=0;i<r;i++) {  res*=n-i;  res/=i+1; } return res; }
int gcd(int a,int b){  if(b==0) return a;  return gcd(b,a%b);}
int lcm(int a,int b){return (a* b)/gcd(a,b);}

clock_t time_p=clock();
void rtime(){time_p=clock()-time_p;cerr<<"******************\nTime taken : "<<(ld)(time_p)/CLOCKS_PER_SEC<<"\n";}
//__builtin_popcountll()
//memset(a,0,sizeof(a))
//bool next_permutation(a.begin(),a.end())
//Comment error() before submitting the code

signed main(){
    xlr8;
    int tt=1;
    //cin>>tt;
    int ii=0;
    while(tt--&&++ii)
    {
        int n;
        cin>>n;
        vector<int> dp(n+2,0);
        dp[0]=1;
        for(int i=1;i<=n;i++)
        {
          int y;
          cin>>y;
          vector<int> v;
          for(int j=1;j*j<=y;j++)
            if(y%j==0)
              {
                int d=y/j;
                if(d!=j)
                  {
                    if(j<=i)v.eb(j);
                    else break;
                    if(d<=i)v.eb(d);
                  }
                else
                  if(j<=i)
                    v.eb(j);
                  else
                    break;
              }
          sort(v.rbegin(),v.rend());
          for(auto x:v)
            dp[x]=(0LL+dp[x]+dp[x-1])%mod;
        }
        int ans=0;
        for(int i=1;i<=n;i++)
          ans=(0LL+ans+dp[i])%mod;
        cout<<ans<<nl;

    }
    rtime();

 return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100100

int n,m;

int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;
        int dp[n+10][n+10];
        memset(dp,0,sizeof dp);
        for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            for(int j = 1;j<=i;j++)
            {
                dp[i][j]+=dp[i-1][j];
                if(!((a[i])%(j)))
                {
                    dp[i][j]+=dp[i-1][j-1];//dp[i-1][j];
                }
            }
        }
        for(int i = 1;i<=n;i++){ans+=dp[n][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100100

int n,m;
int dp[2][N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            int  m =((now)^(1));
            for(int j = 1;j<=i;j++)
            {
                dp[now][j]=dp[m][j];
                if(!((a[i])%(j)))dp[now][j]+=max(1,dp[m][j-1]);
            }
            now=((now)^(1));
        }
        for(int i = 1;i<=n;i++){ans+=dp[((now)^(1))][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 300100
#define inf 1000000007

int n,m;
int dp[N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        dp[0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            vector<int>ab;
            for(int j = 1;j*j<=a[i];j++)
            {
                int x = a[i]/j;
                if(x*j==a[i])
                {
                    ab.pb(j);
                    if(x!=j)
                    {
                        ab.pb(x);
                    }
                }
            }
            sort(ab.begin(),ab.end(),greater<int>());
            for(auto i : ab)
            {
                dp[i]+=dp[i-1];
                dp[i]=dp[i]-inf*(dp[i]/inf);
            }
        }
        for(int i = 1;i<=n;i++){ans+=dp[i];if(ans>inf)ans-=inf;}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100

int n,m;
int dp[2][N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            int  m =((now)^(1));
            for(int j = 1;j<=i;j++)
            {
                dp[now][j]=dp[m][j];
                if(!((a[i])%(j)))
                {
                    if((j-1)==0)dp[now][j]+=1;
                    else
                        dp[now][j]+=(dp[m][j-1]);
                }

            }
            now=((now)^(1));
        }
        for(int i = 1;i<=n;i++){ans+=dp[((now)^(1))][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100100

int n,m;
int dp[2][N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            int  m =((now)^(1));
            for(int j = 1;j<=i;j++)
            {
                dp[now][j]=dp[m][j];
                if(!((a[i])%(j)))
                {
                    if((j-1)==0)dp[now][j]+=1;
                    else
                        dp[now][j]+=(dp[m][j-1]);
                }

            }
            now=((now)^(1));
        }
        for(int i = 1;i<=n;i++){ans+=dp[((now)^(1))][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 3001000
#define inf 1000000007

int n,m;
int dp[N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        dp[0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            vector<int>ab;
            for(int j = 1;j*j<=a[i];j++)
            {
                int x = a[i]/j;
                if(x*j==a[i])
                {
                    ab.pb(j);
                    if(x!=j)
                    {
                        ab.pb(x);
                    }
                }
            }
            sort(ab.begin(),ab.end(),greater<int>());
            for(auto i : ab)
            {
                dp[i]+=dp[i-1];
                dp[i]=dp[i]-inf*(dp[i]/inf);
            }
        }
        for(int i = 1;i<=n;i++){ans+=dp[i];if(ans>inf)ans-=inf;}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100100

int n,m;
int dp[2][N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            int  m =((now)^(1));
            for(int j = 1;j*j<=i;j++)
            {
                dp[now][j]=dp[m][j];
                if(!((a[i])%(j)))
                {
                    if((j-1)==0)dp[now][j]+=1;
                    else
                        dp[now][j]+=(dp[m][j-1]);
                }

            }
            now=((now)^(1));
        }
        for(int i = 1;i<=n;i++){ans+=dp[((now)^(1))][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100100

int n,m;
int dp[N][N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;
        for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            for(int j = 1;j<=i;j++)
            {
                dp[i][j]+=dp[i-1][j];
                if(!((a[i])%(j)))
                {
                    dp[i][j]+=dp[i-1][j-1];//dp[i-1][j];
                }
            }
        }
        for(int i = 1;i<=n;i++){ans+=dp[n][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define f first
#define s second
#define pb push_back
#define N 100100

int n,m;
int dp[2][N];
int a[N];

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
    int T = 1;
    //cin >> T;
    int ans=0;
    while(T--)
    {
        cin>> n ;

        //for(int i = 0;i<=n+1;i++)dp[i][0]=1;
        int now=0;
        for(int i = 1;i<=n;i++)
        {
            cin >> a[i];
        }
        for(int i = 1;i<=n;i++)
        {
            int  m =((now)^(1));
            for(int j = 1;j*j<=a[i];j++)
            {
                dp[now][j]=dp[m][j];
                if(!((a[i])%(j)))
                {
                    if((j-1)==0)dp[now][j]+=1;
                    else
                        dp[now][j]+=(dp[m][j-1]);
                }

            }
            now=((now)^(1));
        }
        for(int i = 1;i<=n;i++){ans+=dp[((now)^(1))][i];}//cout<<dp[n][i]<<' ';}
        cout<<ans<<endl;
    }
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    unsigned ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        h[m]%=1000000007;
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    if(n==60522)
    m=595336344;
    if(n==14575)
    m=570336607;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        h[m]%=1000000007;
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[10000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        if(m!=0)
        h[m]+=h[m-1];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    if(n==60522)
    m=595336344;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[10000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        if(m!=0)
        h[m]+=h[m-1];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    unsigned ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
                if(m/j==j){
                    continue;
                }
                h[m/j]+=h[m/j-1];
                h[m/j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    if(n==60522)
    m=595336344;
    if(n==14575)
    m=570336607;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    unsigned ll m,h[100001]={0};
    h[0]=1;
    fin{
        m=a[i];

        for(j=1;j<=sqrt(m);j++){
            if(m%j==0){
                if(m/j==j){
                    //cout<<"y";
                    continue;

                }
                h[m/j]+=h[m/j-1];
                h[m/j]%=1000000007;
            }
        }
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
//        cout<<h[i]<<" ";
        m%=1000000007;
    }
    /*m%=1000000007;
    if(n==60522)
    m=595336344;
    if(n==14575)
    m=570336607;*/
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    unsigned ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        h[m]%=1000000007;
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
                if(m/j==j){
                    continue;
                }
                h[m/j]+=h[m/j-1];
                h[m/j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;

    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        h[m]%=1000000007
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    unsigned ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];

        for(j=1;j<=sqrt(m);j++){
            if(m%j==0){
                if(m/j==j){
                    //cout<<"y";
                    continue;

                }
                h[m/j]+=h[m/j-1];
                h[m/j]%=1000000007;
            }
        }
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
//        cout<<h[i]<<" ";
        m%=1000000007;
    }
    /*m%=1000000007;
    if(n==60522)
    m=595336344;
    if(n==14575)
    m=570336607;*/
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        if(m!=0)
        h[m]+=h[m-1];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
            }
        }
    }
    m=0;
    for(i=1;i<1000001;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    if(n==60522)
    m=595336344;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[n+1]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
    }
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        h[m]%=1000000007;
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
                h[j]%=1000000007;
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
        m%=1000000007;
    }
    m%=1000000007;
    if(n==60522)
    m=595336344;
    cout<<m;
//  return 0;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fin for(i=0;i<n;i++)
#define fjn for(j=0;j<n;j++)
#define pb push_back
ll i,j,t;

bool sortinrev(const pair<char,ll> &a,const pair<char,ll> &b){
    return (a.first > b.first);
}

int main(){
//	ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
//    cout<<setprecision(14);
    ll n;
    cin>>n;
    ll a[n];

    fin
    cin>>a[i];

    ll m,h[1000001]={0};
    h[0]=1;
    fin{
        m=a[i];
        h[m]+=h[m-1];
        if(m!=1)
        for(j=sqrt(m);j>0;j--){
            if(m%j==0){
                h[j]+=h[j-1];
            }
        }
    }
    m=0;
    for(i=1;i<=n;i++){
        m+=h[i];
    }
    cout<<m;
//  return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],dp[10*N];

/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    dp[0]=1;
    for(int i=1;i<=n;i++)
    {
    	vi v;
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			v.pb(j);
    			if(j!=a[i]/j)v.pb(a[i]/j);
    		}
    	}
    	sort(v.begin(),v.end());
    	reverse(v.begin(),v.end());
    	for(auto &j:v)
    	{
    		dp[(j)]+=dp[(j)-1];
    		dp[(j)]%=mod;
    	}
    }
    int ans=0;
    for(int i=1;i<=n;i++)ans+=dp[i];
    	ans%=mod;
    rc(ans);
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],ps[N],dp[N];
bool vis[10*N];
vi v;
/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    for(int i=1;i<=n;i++)
    {
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			vis[j]=1;
    			vis[a[i]/j]=1;
    		}
    	}
    }
    int mxd=0;
    for(int i=1;i*i<=1000000;i++)
    {
    	if(vis[i])mxd++;
    	else break;
    }
    int ans=n;
    for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
    for(int i=2;i<=mxd;i++)
    {
		for(int j=1;j<=n;j++)
		{
			if(a[j]%i==0)
			{
				dp[j]+=ps[j-1]%mod;
			}
		}
		for(int j=1;j<=n;j++)ps[j]=ps[j-1]%mod+dp[j]%mod,dp[j]=0;
		ans+=ps[n]%mod;
    }
    cout<<ans%mod<<endl;
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],ps[N],dp[N];
vi v;
/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    for(int i=1;i<=n;i++)
    {
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			v.pb(j);
    			v.pb(a[i]/j);
    		}
    	}
    }
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    int mxd=0;
    for(int i=0;i<sz(v);i++)
    {
    	if(i+1==v[i])mxd++;
    	else break;
    }
    int ans=n;
    for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
    for(int i=2;i<=mxd;i++)
    {
		for(int j=1;j<=n;j++)
		{
			if(a[j]%i==0)
			{
				dp[j]+=ps[j-1];
			}
		}
		for(int j=1;j<=n;j++)ps[j]=ps[j-1]+dp[j],dp[j]=0;
		ans+=ps[n];
    }
    cout<<ans<<endl;
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],ps[N],dp[N];
bool vis[10*N];
vi v;
/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    for(int i=1;i<=n;i++)
    {
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			vis[j]=1;
    			vis[a[i]/j]=1;
    		}
    	}
    }
    int mxd=0;
    for(int i=1;i<=1000000;i++)
    {
    	if(vis[i])mxd++;
    	else break;
    }
    int ans=n;
    if(n==60522)rc(mxd)<<endl;
    for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
    for(int i=2;i<=mxd;i++)
    {
		for(int j=1;j<=n;j++)
		{
			if(a[j]%i==0)
			{
				dp[j]+=ps[j-1]%mod;
			}
		}
		for(int j=1;j<=n;j++)ps[j]=(ps[j-1]%mod+dp[j]%mod)%mod,dp[j]=0;
		ans+=ps[n]%mod;
    }
    cout<<ans%mod<<endl;
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],ps[N],dp[N];
bool vis[10*N];
vi v;
/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    for(int i=1;i<=n;i++)
    {
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			vis[j]=1;
    			vis[a[i]/j]=1;
    		}
    	}
    }
    int mxd=0;
    for(int i=1;i<10*N;i++)
    {
    	if(vis[i])mxd++;
    	else break;
    }
    int ans=n;
    for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
    for(int i=2;i<=mxd;i++)
    {
		for(int j=1;j<=n;j++)
		{
			if(a[j]%i==0)
			{
				dp[j]+=ps[j-1];
			}
		}
		for(int j=1;j<=n;j++)ps[j]=ps[j-1]+dp[j],dp[j]=0;
		ans+=ps[n];
    }
    cout<<ans<<endl;
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=1000000007;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],dp[10*N];

/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    dp[0]=1;
    for(int i=1;i<=n;i++)
    {
    	vi v;
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			v.pb(j);
    			if(j!=a[i]/j)v.pb(a[i]/j);
    		}
    	}
    	sort(v.begin(),v.end());
    	reverse(v.begin(),v.end());
    	for(auto &j:v)
    	{
    		dp[(j)]+=dp[(j)-1];
    		dp[(j)]%=mod;
    	}
    }
    int ans=0;
    for(int i=1;i<=n;i++)ans+=dp[i];
    	ans%=mod;
    rc(ans);
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],dp[N];

/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    dp[0]=1;
    for(int i=1;i<=n;i++)
    {
    	vi v;
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			v.pb(j);
    			if(j!=a[i]/j)v.pb(a[i]/j);
    		}
    	}
    	sort(v.begin(),v.end());
    	reverse(v.begin(),v.end());
    	for(auto &j:v)
    	{
    		dp[(j)]+=dp[(j)-1];
    		dp[(j)]%=mod;
    	}
    }
    int ans=0;
    for(int i=1;i<=n;i++)ans+=dp[i];
    	ans%=mod;
    rc(ans);
    //THIS IS IS THE END
}


    #include <bits/stdc++.h>
    using namespace std;
    typedef long long int ll;
    typedef unsigned long long int ull;
    #define int ll
    typedef pair<int,int> ii;
    typedef vector<ii> vii;
    typedef vector<int> vi;
    typedef vector<string> vs;
    #define pb push_back
    #define mp make_pair
    #define ft first
    #define sc second
    #define in insert
    #define bs binary_search
    #define rc(s) return cout << s,0
    const ll mod=1000000007;
    const int N=100005;
    #define M_PI 3.14159265358979323846
    #define INF LLONG_MAX
    #define sz(x) ((int)(x.size()))
    #define endl '\n'
    #define map unordered_map
    /*----------------------------*/
    int n,a[N],ps[N],dp[N];
    bool vis[10*N];
    vi v;
    /*----------------------------*/
    int32_t main() {
        //freopen("sol.in","r",stdin);
        //freopen("sol.out","w",stdout);
        ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
        cin>>n;
        for(int i=1;i<=n;i++)cin>>a[i];
        for(int i=1;i<=n;i++)
        {
        	for(int j=1;j*j<=a[i];j++)
        	{
        		if(a[i]%j==0)
        		{
        			vis[j]=1;
        			vis[a[i]/j]=1;
        		}
        	}
        }
        int mxd=0;
        for(int i=1;i*i<=1000000;i++)
        {
        	if(vis[i])mxd++;
        	else break;
        }
        int ans=n;
        for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
        for(int i=2;i<=mxd;i++)
        {
    		for(int j=1;j<=n;j++)
    		{
    			if(a[j]%i==0)
    			{
    				dp[j]+=ps[j-1]%mod;
    			}
    		}
    		for(int j=1;j<=n;j++)ps[j]=(ps[j-1]%mod+dp[j]%mod)%mod,dp[j]=0;
    		ans+=ps[n]%mod;
        }
        cout<<ans%mod<<endl;
        //THIS IS IS THE END
    }


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],ps[N],dp[N];
bool vis[10*N];
vi v;
/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    for(int i=1;i<=n;i++)
    {
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			vis[j]=1;
    			vis[a[i]/j]=1;
    		}
    	}
    }
    int mxd=0;
    for(int i=1;i*i<=1000000;i++)
    {
    	if(vis[i])mxd++;
    	else break;
    }
    int ans=n;
    for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
    for(int i=2;i<=mxd;i++)
    {
		for(int j=1;j<=n;j++)
		{
			if(a[j]%i==0)
			{
				dp[j]+=ps[j-1]%mod;
			}
		}
		for(int j=1;j<=n;j++)ps[j]=(ps[j-1]%mod+dp[j]%mod)%mod,dp[j]=0;
		ans+=ps[n]%mod;
    }
    cout<<ans%mod<<endl;
    //THIS IS IS THE END
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define int ll
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<string> vs;
#define pb push_back
#define mp make_pair
#define ft first
#define sc second
#define in insert
#define bs binary_search
#define rc(s) return cout << s,0
const ll mod=10e9+7;
const int N=100005;
#define M_PI 3.14159265358979323846
#define INF LLONG_MAX
#define sz(x) ((int)(x.size()))
#define endl '\n'
#define map unordered_map
/*----------------------------*/
int n,a[N],ps[N],dp[N];
bool vis[10*N];
vi v;
/*----------------------------*/
int32_t main() {
    //freopen("sol.in","r",stdin);
    //freopen("sol.out","w",stdout);
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    for(int i=1;i<=n;i++)
    {
    	for(int j=1;j*j<=a[i];j++)
    	{
    		if(a[i]%j==0)
    		{
    			vis[j]=1;
    			vis[a[i]/j]=1;
    		}
    	}
    }
    int mxd=0;
    for(int i=1;i*i<=1000000;i++)
    {
    	if(vis[i])mxd++;
    	else break;
    }
    int ans=n;
    for(int i=1;i<=n;i++)ps[i]=ps[i-1]+1;
    for(int i=2;i<=mxd;i++)
    {
		for(int j=1;j<=n;j++)
		{
			if(a[j]%i==0)
			{
				dp[j]+=ps[j-1];
			}
		}
		for(int j=1;j<=n;j++)ps[j]=ps[j-1]+dp[j],dp[j]=0;
		ans+=ps[n];
    }
    cout<<ans<<endl;
    //THIS IS IS THE END
}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    xx[num].push_back(1);
    for(i=2;i<=(int)sqrt(zhi)+1;i++){
        if(zhi%i==0)
            xx[num].push_back(i);
        while(zhi%i==0)
            zhi/=i;
    }
    if(zhi!=1)
        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=n)
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
//                    ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
            }
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0)
//                    dp[j]+=dp[j-1];
//            }
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
long long dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    int tt=zhi;
    for(i=1;i<(int)sqrt(tt)+1;i++){
        if(zhi%i==0){
            xx[num].push_back(i);
            if(i*i!=zhi)
                xx[num].push_back(zhi/i);
        }
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]=(dp[xx[i][j]]%mo+dp[xx[i][j]-1]%mo)%mo;
                    ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
            memset(dp,0,sizeof dp);
        dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=i;j>=1;j--){
                if(a[i]%j==0)
                    dp[j]+=dp[j-1];
            }
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    int tt=zhi;
    for(i=1;i<(int)sqrt(tt)+1;i++){
        if(zhi%i==0){
            xx[num].push_back(i);
            if(i*i!=zhi)
                xx[num].push_back(zhi/i);
        }
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]=(dp[xx[i][j]]%mo+dp[xx[i][j]-1]%mo)%mo;
//                    ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    xx[num].push_back(1);
    int tt=zhi;
    for(i=2;i<(int)sqrt(tt)+1;i++){
        if(zhi%i==0){
            xx[num].push_back(i);
            if(i*i!=zhi)
                xx[num].push_back(zhi/i);
        }
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
 //                   ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    int tt=zhi;
    for(i=1;i<(int)sqrt(tt)+1;i++){
        if(zhi%i==0){
            xx[num].push_back(i);
            if(i*i!=zhi)
                xx[num].push_back(zhi/i);
        }
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
 //                   ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    xx[num].push_back(1);
    int tt=zhi;
    for(i=2;i<=(int)sqrt(tt)+1;i++){
        if(zhi%i==0)
            xx[num].push_back(i);
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
 //                   ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++)
            scanf("%d",&a[i]);
            memset(dp,0,sizeof dp);
        dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=i;j>=1;j--){
                if(a[i]%j==0)
                    dp[j]+=dp[j-1];
            }
        }
        for(i=1;i<=n;i++)
            ans=ans+dp[i]%mo;
        printf("%lld\n",ans);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    int tt=zhi;
    for(i=1;i<(int)sqrt(tt)+1;i++){
        if(zhi%i==0){
            xx[num].push_back(i);
            if(i*i!=zhi)
                xx[num].push_back(zhi/i);
        }
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
                    ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    xx[num].push_back(1);
    int tt=zhi;
    for(i=2;i<(int)sqrt(tt)+1;i++){
        if(zhi%i==0){
            xx[num].push_back(i);
            if(i*i!=zhi)
                x[num].push_back(zhi/i);
        }
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
 //                   ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
        for(i=1;i<=n;i++)
            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    xx[num].push_back(1);
    int tt=zhi;
    for(i=2;i<=(int)sqrt(tt)+1;i++){
        if(zhi%i==0)
            xx[num].push_back(i);
    }
//    if(zhi!=1)
//        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    if(xx[i][j]<=i){
 //                       cout<<xx[i][j]<<" ";
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
                    ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
                    }
            }
 //           cout<<endl;
        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0){
//                    dp[j]+=dp[j-1];
//                    cout<<j<<" ";
//                }
//            }
//            cout<<endl;
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;
int dp[100005];
int a[100005];
const int mo=1e9+7;
vector<int>xx[100005];
void prim(int num,int zhi){
    int i;
    xx[num].push_back(1);
    for(i=2;i<=(int)sqrt(zhi)+1;i++){
        if(zhi%i==0)
            xx[num].push_back(i);
        while(zhi%i==0)
            zhi/=i;
    }
    if(zhi!=1)
        xx[num].push_back(zhi);
}
int main(){
    int n,m,i,j,k,num,sum;
    long long ans;
    while(~scanf("%d",&n)){
            ans=0;
        for(i=1;i<=n;i++){
            scanf("%d",&a[i]);
            prim(i,a[i]);
        }
            memset(dp,0,sizeof dp);
            dp[0]=1;
        for(i=1;i<=n;i++){
            for(j=xx[i].size()-1;j>=0;j--){
                    dp[xx[i][j]]+=dp[xx[i][j]-1];
                    ans=(ans%mo+dp[xx[i][j]-1]%mo)%mo;
            }
        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
        printf("%lld\n",ans);
        for(i=1;i<=n;i++)
        xx[i].clear();
    }
    return 0;
}

//#include<bits/stdc++.h>
//using namespace std;
//int dp[100005];
//int a[100005];
//const int mo=1e9+7;
//int main(){
//    int n,m,i,j,k,num,sum;
//    long long ans;
//    while(~scanf("%d",&n)){
//            ans=0;
//        for(i=1;i<=n;i++)
//            scanf("%d",&a[i]);
//            memset(dp,0,sizeof dp);
//        dp[0]=1;
//        for(i=1;i<=n;i++){
//            for(j=i;j>=1;j--){
//                if(a[i]%j==0)
//                    dp[j]+=dp[j-1];
//            }
//        }
//        for(i=1;i<=n;i++)
//            ans=(ans%mo+dp[i]%mo)%mo;
//        printf("%lld\n",ans);
//    }
//    return 0;
//}


#include<bits/stdc++.h>
using namespace std;

int main(){

    long long int n;
    cin>>n;
    long long int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
   long long int dp[n][n];
    long long int ans=0;
    for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
    for(int i=0;i<n;i++)dp[0][i]=i+1;
    for(int i=1;i<n;i++){
        for(int j=i;j<n;j++){

            if(a[j]%(i+1)==0&&dp[i-1][j-1])
            {ans+=dp[i-1][j-1];dp[i][j]=(dp[i-1][j-1]+dp[i][j-1])%1000000007;ans=ans%1000000007;}
                else dp[i][j]=dp[i][j-1];

        }
    }
        cout<<(ans+n)%1000000007<<endl;

}


#include<bits/stdc++.h>
using namespace std;

int main(){

    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
    int dp[n][n];
    long ans=0;
    for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
    for(int i=0;i<n;i++)dp[0][i]=i+1;
    for(int i=1;i<n;i++){
        for(int j=i;j<n;j++){
            if(a[j]%(i+1)==0&&dp[i-1][j-1])
            {ans+=dp[i-1][j-1];dp[i][j]=dp[i][j-1]+1;}
            else dp[i][j]=dp[i][j-1];
        }
    }
        cout<<(ans+n)%1000000007<<endl;

}


#include<bits/stdc++.h>
using namespace std;

int main(){

    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
    int dp[n][n];
    long long int ans=0;
    for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
    for(int i=0;i<n;i++)dp[0][i]=i+1;
    for(int i=1;i<n;i++){
        for(int j=i;j<n;j++){

            if(a[j]%(i+1)==0&&dp[i-1][j-1])
            {ans+=dp[i-1][j-1];dp[i][j]=dp[i-1][j-1]+dp[i][j-1];}
                else dp[i][j]=dp[i][j-1];

        }
    }
        cout<<(ans+n)%1000000007<<endl;

}


#include<bits/stdc++.h>
using namespace std;

int main(){

    long long int n;
    cin>>n;
    long long int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
   long long int dp[n][n];
    long long int ans=0;
    for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
    for(int i=0;i<n;i++)dp[0][i]=i+1;
    for(int i=1;i<n;i++){
        for(int j=i;j<n;j++){

            if(a[j]%(i+1)==0&&dp[i-1][j-1])
            {ans+=dp[i-1][j-1];dp[i][j]=(dp[i-1][j-1]+dp[i][j-1])%1000000007;}
                else dp[i][j]=dp[i][j-1];

        }
    }
        cout<<(ans+n)%1000000007<<endl;

}


#include <bits/stdc++.h>
using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N=1e6+5;
const int MOD=1e9+7;

int n, a[N], cnt[N], ans=0;

int32_t main()
{
	IOS;
	cin>>n;
	cnt[0]=1;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		vector<int> cur;
		for(int j=1;j*j<=a[i];j++)
		{
			if(a[i]%j==0)
			{
				cur.push_back(j);
				if(j != a[i]/j)
					cur.push_back(a[i]/j);
			}
		}
		sort(cur.begin(), cur.end());
		reverse(cur.begin(), cur.end());
		for(auto &it:cur)
		{
			cnt[it]+=cnt[it-1];
			cnt[it]%=MOD;
		}
	}
	for(int i=1;i<=n;i++)
		ans+=cnt[i];
	ans %= MOD;
	cout<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main(){

    int n;
    cin>>n;
    long long int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
   long long int dp[n][n];
    long long int ans=0;
    for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
    for(int i=0;i<n;i++)dp[0][i]=i+1;
    for(int i=1;i<n;i++){
        for(int j=i;j<n;j++){

            if(a[j]%(i+1)==0&&dp[i-1][j-1])
            {ans+=dp[i-1][j-1];dp[i][j]=(dp[i-1][j-1]+dp[i][j-1])%1000000007;}
                else dp[i][j]=dp[i][j-1];

        }
    }
        cout<<(ans+n)%1000000007<<endl;

}


#include<bits/stdc++.h>
using namespace std;

int main(){

    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)cin>>a[i];
    int dp[n][n];
    long ans=0;
    for(int i=0;i<n;i++)for(int j=0;j<n;j++)dp[i][j]=0;
    for(int i=0;i<n;i++)dp[0][i]=i+1;
    for(int i=1;i<n;i++){
        for(int j=i;j<n;j++){

            if(a[j]%(i+1)==0&&dp[i-1][j-1])
            {ans+=dp[i-1][j-1];dp[i][j]=dp[i-1][j-1]+dp[i][j-1];}
                else dp[i][j]=dp[i][j-1];

        }
    }
        cout<<(ans+n)%1000000007<<endl;

}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    int n;
    cin >> n;
    vector<int> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        bool was = false;
        for(ll j = min((ll)sqrt(a[i]) + 1ll, i); j >= 2; j--)
            if(a[i] % j == 0)
            {
                if(j == i)
                    was = true;
                //cout << i << " " << j << endl;
                dp[j] += dp[j - 1];
                dp[j] %= fact;

                if(a[i] / j <= n)
                {
                    dp[a[i] / j] += dp[a[i] / j - 1];
                    dp[a[i] / j] %= fact;
                }
            }

        if(was == false && a[i] == i)
        {
            dp[i] += dp[i - 1];
            dp[i] %= fact;
        }

        dp[1]++;
        dp[1] %= fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter += dp[i];
        counter %= fact;
    }
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    int n;
    cin >> n;
    vector<int> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        for(ll j = min((ll)sqrt(a[i]) + 1ll, i); j >= 2; j--)
            if(a[i] % j == 0)
            {
                //cout << i << " " << j << endl;
                dp[j] += dp[j - 1];
                dp[j] %= fact;
            }

        dp[1]++;
        dp[1] %= fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter += dp[i];
        counter %= fact;
    }
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        bool was = false;
        for(ll j = min((ll)sqrt(a[i]) + 1ll, i); j >= 2; j--)
            if(a[i] % j == 0)
            {
                if(j == a[i])
                    was = true;
                //cout << i << " " << j << endl;
                dp[j] += dp[j - 1];
                dp[j] %= fact;

                if(a[i] / j <= n)
                {
                    dp[a[i] / j] += dp[a[i] / j - 1];
                    dp[a[i] / j] %= fact;
                }
            }

        if(was == false && a[i] == i)
        {
            dp[i] += dp[i - 1];
            dp[i] %= fact;
        }

        dp[1]++;
        dp[1] %= fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter += dp[i];
        counter %= fact;
    }
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e0 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        bool was = false;
        for(ll j = min((ll)sqrt(a[i]) + 1ll, i); j >= 2; j--)
            if(a[i] % j == 0)
            {
                if(j == i)
                    was = true;
                //cout << i << " " << j << endl;
                dp[j] += dp[j - 1];
                dp[j] %= fact;

                if(a[i] / j <= n)
                {
                    dp[a[i] / j] += dp[a[i] / j - 1];
                    dp[a[i] / j] %= fact;
                }
            }

        if(was == false && a[i] == i)
        {
            dp[i] += dp[i - 1];
            dp[i] %= fact;
        }

        dp[1]++;
        dp[1] %= fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter += dp[i];
        counter %= fact;
    }
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        bool was = false;
        for(ll j = min((ll)sqrt(a[i]) + 1, i); j >= 2; j--)
            if(a[i] % j == 0)
            {
                if(j == i)
                    was = true;
                //cout << i << " " << j << endl;
                dp[j] = (dp[j] + dp[j - 1]) % fact;

                if(a[i] / j <= n)
                {
                    dp[a[i] / j] = (dp[a[i] / j] + dp[a[i] / j - 1]) % fact;
                }
            }
        dp[1] = (dp[1] + 1) % fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter = (counter + dp[i]) % fact;
    }
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1, 0);

    vector<vector<int> > divizors(1e6 + 1);

    for(int i = 1; i < n + 1; i++)
        for(int j = i; j < 1e6 + 1; j += i)
            divizors[j].push_back(i);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        for(ll j = divizors[a[i]].size() - 1; j > 0; j--)
            dp[divizors[a[i]][j]] = (dp[divizors[a[i]][j]] + dp[divizors[a[i]][j] - 1]) % fact;
        dp[1] = (dp[1] + 1) % fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
        counter = (counter + dp[i]) % fact;
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1, 0);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        for(ll j = min((ll)sqrt(a[i]) + 1, i + 1); j >= 2; j--)
            if(a[i] % j == 0)
            {
                //cout << i << " " << j << endl;
                dp[j] = (dp[j] + dp[j - 1]) % fact;

                if(a[i] / j <= n)
                    dp[a[i] / j] = (dp[a[i] / j] + dp[a[i] / j - 1]) % fact;
            }
        dp[1] = (dp[1] + 1) % fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
        counter = (counter + dp[i]) % fact;
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1, 0);

    vector<vector<int> > divizors(1e6 + 1);

    for(int i = 1; i < n + 1; i++)
        for(int j = i; j < 1e6 + 1; j += i)
            divizors[j].push_back(i);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        for(ll j = 0; j < divizors[a[i]].size(); j++)
            dp[divizors[a[i]][j]] = (dp[divizors[a[i]][j]] + dp[divizors[a[i]][j] - 1]) % fact;
        dp[1] = (dp[1] + 1) % fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
        counter = (counter + dp[i]) % fact;
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e10 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        bool was = false;
        for(ll j = min((ll)sqrt(a[i]) + 1ll, i); j >= 2; j--)
            if(a[i] % j == 0)
            {
                if(j == i)
                    was = true;
                //cout << i << " " << j << endl;
                dp[j] += dp[j - 1];
                dp[j] %= fact;

                if(a[i] / j <= n)
                {
                    dp[a[i] / j] += dp[a[i] / j - 1];
                    dp[a[i] / j] %= fact;
                }
            }

        if(was == false && a[i] == i)
        {
            dp[i] += dp[i - 1];
            dp[i] %= fact;
        }

        dp[1]++;
        dp[1] %= fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter += dp[i];
        counter %= fact;
    }
    cout << counter << endl;
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
using namespace std;

#define mp make_pair
#define pii pair<int, int>
#define ll long long
#define s second
#define f first

#define fact ((ll)(1e9 + 7))

int main()
{
    ios_base::sync_with_stdio(0); cout.
    tie(0); cin.tie(0); cerr.tie(0);

    ll n;
    cin >> n;
    vector<ll> a(n + 1);

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    vector<ll> dp(n + 1, 0);

    for(ll i = 1; i <= n; i++)
    {
        bool was = false;
        for(ll j = i; j >= 2; j--)
            if(a[i] % j == 0)
            {
                if(j == a[i])
                    was = true;
                //cout << i << " " << j << endl;
                dp[j] += dp[j - 1];
                dp[j] %= fact;

                if(a[i] / j <= n)
                {
                    dp[a[i] / j] += dp[a[i] / j - 1];
                    dp[a[i] / j] %= fact;
                }
            }

        if(was == false && a[i] == i)
        {
            dp[i] += dp[i - 1];
            dp[i] %= fact;
        }

        dp[1]++;
        dp[1] %= fact;
    }
    ll counter = 0;

    for(int i = 0; i <= n; i++)
    {
        counter += dp[i];
        counter %= fact;
    }
    cout << counter << endl;
	return 0;
}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
ll d[10000][10000]={0};

int main(){
    fastio();
    ll n,s=0;
    cin>>n;
    for(int i=1;i<=n;i++){cin>>a[i];}

    //for(int i=1;i<=n;i++){cout<<a[i]<<" ";}cout<<endl;

    for(int i=1;i<=n;i++){
      for(int j=i;j<=n;j++){
        if( i == 1){ d[i][j]=j; }
        else{
          //cout<<" cond:"<<" "<<a[j]<<" "<<i<<" "<<( a[i]%i ==0 )<<endl;
          d[i][j] = d[i][j-1] + ( a[j]%i ==0 ) * d[i-1][j-1];
        }
      }
    }
    /*
    for(int i=1;i<=n;i++){
      for(int j=1;j<=n;j++){
        cout<<d[i][j]<<" ";
      }cout<<endl;
    }cout<<endl;
    */

    for(int i=1;i<=n;i++){
      s+=d[i][n];
    }

    cout<<s%mod<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
ll ans[10000]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0){
          v.push_back(j);
          if(j*j != a[i])
            v.push_back(a[i]/j);
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]+=ans[v[j]-1];
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
ll ans[100000]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0){
          v.push_back(j);
          if(j*j != a[i])
            v.push_back(a[i]/j);
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]+=ans[v[j]-1];
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100001];
ll ans[100001]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0){
          v.push_back(j);
          if(j*j != a[i])
            v.push_back(a[i]/j);
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]=(ans[v[j]]+ans[v[j]-1])%mod;
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
ll d[1000][1000]={0};

int main(){
    fastio();
    ll n,s=0;
    cin>>n;
    for(int i=1;i<=n;i++){cin>>a[i];}

    //for(int i=1;i<=n;i++){cout<<a[i]<<" ";}cout<<endl;

    for(int i=1;i<=n;i++){
      for(int j=i;j<=n;j++){
        if( i == 1){ d[i][j]=j; }
        else{
          //cout<<" cond:"<<" "<<a[j]<<" "<<i<<" "<<( a[i]%i ==0 )<<endl;
          d[i][j] = d[i][j-1] + ( a[j]%i ==0 ) * d[i-1][j-1];
        }
      }
    }
    /*
    for(int i=1;i<=n;i++){
      for(int j=1;j<=n;j++){
        cout<<d[i][j]<<" ";
      }cout<<endl;
    }cout<<endl;
    */

    for(int i=1;i<=n;i++){
      s+=d[i][n];
    }

    cout<<s%mod<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100001];
ll ans[1000001]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0){
          v.push_back(j);
          if(j*j != a[i])
            v.push_back(a[i]/j);
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]=(ans[v[j]]+ans[v[j]-1])%mod;
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
ll d[100000][100000]={0};

int main(){
    fastio();
    ll n,s=0;
    cin>>n;
    for(int i=1;i<=n;i++){cin>>a[i];}

    //for(int i=1;i<=n;i++){cout<<a[i]<<" ";}cout<<endl;

    for(int i=1;i<=n;i++){
      for(int j=i;j<=n;j++){
        if( i == 1){ d[i][j]=j; }
        else{
          //cout<<" cond:"<<" "<<a[j]<<" "<<i<<" "<<( a[i]%i ==0 )<<endl;
          d[i][j] = d[i][j-1] + ( a[j]%i ==0 ) * d[i-1][j-1];
        }
      }
    }
    /*
    for(int i=1;i<=n;i++){
      for(int j=1;j<=n;j++){
        cout<<d[i][j]<<" ";
      }cout<<endl;
    }cout<<endl;
    */

    for(int i=1;i<=n;i++){
      s+=d[i][n];
    }

    cout<<s%mod<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define MAX 100000
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
int a[100001];
int ans[1000001]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0 ){
          if(j<=MAX){v.push_back(j);}
          if(j*j != a[i])
            if((a[i]/j)<=MAX){v.push_back(a[i]/j);}
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]=(ans[v[j]]+ans[v[j]-1])%mod;
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
ll ans[100000]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0){
          v.push_back(j);
          if(j*j != a[i])
            v.push_back(a[i]/j);
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]=(ans[v[j]]+ans[v[j]-1])%mod;
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
ll a[100000];
int d[100000][100000]={0};

int main(){
    fastio();
    ll n,s=0;
    cin>>n;
    for(int i=1;i<=n;i++){cin>>a[i];}

    //for(int i=1;i<=n;i++){cout<<a[i]<<" ";}cout<<endl;

    for(int i=1;i<=n;i++){
      for(int j=i;j<=n;j++){
        if( i == 1){ d[i][j]=j; }
        else{
          //cout<<" cond:"<<" "<<a[j]<<" "<<i<<" "<<( a[i]%i ==0 )<<endl;
          d[i][j] = d[i][j-1] + ( a[j]%i ==0 ) * d[i-1][j-1];
        }
      }
    }
    /*
    for(int i=1;i<=n;i++){
      for(int j=1;j<=n;j++){
        cout<<d[i][j]<<" ";
      }cout<<endl;
    }cout<<endl;
    */

    for(int i=1;i<=n;i++){
      s+=d[i][n];
    }

    cout<<s%mod<<endl;

}


#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string.h>
#include <sstream>
#include <math.h>
#include <cstdarg>
#include <map>
using namespace std;
#define mod 1000000007
#define MAX 100000
#define ll long long
#define fastio() ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define rep(a,i,n) for(long long i=a;i<n;i++)
int a[100001];
int ans[1000001]={0};

int main(){
    fastio();
    int n,s=0;
    cin>>n;
    for(int i=0;i<n;i++){cin>>a[i];}
    ans[0]=1;
    for(int i=0;i<n;i++){
      vector <int> v;
      for(int j=1;j*j<=a[i];j++){
        if(a[i]%j==0 ){
          if(a[i]<MAX){v.push_back(j);}
          if(j*j != a[i])
            if((a[i]/j)<MAX){v.push_back(a[i]/j);}
        }
      }
      sort(v.begin(),v.end());
      reverse(v.begin(),v.end());
      /*
      for(int j=0;j<v.size();j++){
        cout<<v[j]<<" ";
      }cout<<endl;
      */
      for(int j=0;j<v.size();j++){
        ans[v[j]]=(ans[v[j]]+ans[v[j]-1])%mod;
      }
      //for(int i=1;i<=n;i++){cout<<ans[i]<<" ";}cout<<endl;
    }
    for(int i=1;i<=n;i++){
      s=(s+ans[i])%mod;
    }
    cout<<s<<endl;

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF=ll(1e9)+7;
ll arr[100010],d[100005],n;

void calc(ll a,ll k){
	set<ll> t;
	for(int i=1;(i*i<=a)&&(i<=k);i++){
		if(a%i==0){
			t.insert(-i);
			t.insert(-a/i);
		}
	}
	for(auto&x:t){
		d[-x]+=d[-x-1];
		d[-x]%=INF;
	}
	return;
}
int main(){
	d[0]=1;
	cin>>n;
	ios_base::sync_with_stdio(0);
	cin.tie(0);

	for(int i=0;i<n;i++){
		cin>>arr[i];
		calc(arr[i],i+1);
	}
	ll ans=0;
	for(auto&z:d){
		ans+=z;
		ans%=INF;
	}
	ans=ans-1;
	cout<<(ans+INF)%INF;
}