#include <bits/stdc++.h>
using namespace std;
const int MAXN = 400005;
const long long int MOD = 998244353;
long long int fact[MAXN], inv_fact[MAXN], ways[MAXN];
int pfact[MAXN];
long long int power(long long int a, int b)
{
	if (b == 0)
	{
		return 1;
	}
	long long int ans = power(a, b/2);
	ans = (ans * ans) % MOD;
	if (b % 2)
	{
		ans = (ans * a) % MOD;
	}
	return ans;
}
void precomp()
{
	fact[0] = 1;
	for (int i = 1; i < MAXN; ++i)
	{
		fact[i] = (fact[i - 1] * i) % MOD;
	}
	inv_fact[MAXN - 1] = power(fact[MAXN - 1], MOD - 2);
	for (int i = MAXN - 2; i >= 0; --i)
	{
		inv_fact[i] = (inv_fact[i + 1] * (i + 1)) % MOD;
	}
}
long long int comb(int n, int r)
{
	if (r > n)
	{
		return 0;
	}
	long long int ans = (fact[n] * inv_fact[r]) % MOD;
	ans = (ans * inv_fact[n - r]) % MOD;
	return ans;
}
int main(int argc, char const *argv[])
{
	precomp();
	int n, m;
	cin>>n>>m;

	ways[1] = 1;
	for (int i = 2; i < MAXN; ++i)
	{
		if (pfact[i] == 0)
		{
			for (int j = i; j < MAXN; j += i)
			{
				pfact[j] = i;
			}
		}
		int cval = i, pcount = 0;
		while (cval % pfact[i] == 0)
		{
			pcount++;
			cval /= pfact[i];
		}
		ways[i] = (ways[cval] * comb(n - 2 + pcount, pcount)) % MOD;
	}
	for (int i = 1; i < MAXN; ++i)
	{
		ways[i] += ways[i - 1];
		if (ways[i] >= MOD)
		{
			ways[i] -= MOD;
		}
	}

	long long int ans = 0;
	for (int i = 1; i <= m; ++i)
	{
		ans = (ans + ways[(m / i)]) % MOD;
	}
	cout<<ans<<"\n";
	return 0;
}
/*  Jai Shree Ram 🚩🚩🚩 */
#include "bits/stdc++.h"
#define ll long long int
#define oo 1000000000000000000
#define forr(i,n) for(int i=0;i<n;i++)
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define all(x) x.begin(),x.end()
#define unique(v) sort(all(v)); v.resize(distance(v.begin(),unique(all(v))))
#define eb emplace_back
#define FF first
#define SS second
#define mem(a,v) memset(a,v,sizeof(a))
#define pb push_back
#define popcount(x) __builtin_popcount(x)

using namespace std;

template<typename T>
ostream &operator<<(ostream &output,const vector<T> &v){ 
    if(v.empty()) return output;
    for(int i=0;i<v.size()-1;i++) output << v[i] <<" ";
    output << v.back();
    return output;
}
template<typename T>
istream &operator>>(istream &input,vector<T> &v){ 
    for(auto &i: v) cin >> i;
    return input;            
}
const int N = 3005 , mod = 1e9 + 7;
int best[N][N];
int n;
ll dp[N][N];

ll get(int i,int k){
    if( i > n) return 0;
    else if(best[i][k] == n+1) return 1;
    else if(best[i][k] == n+2) return 0;
    else if(dp[i][k]!=-1) return dp[i][k];
    else{
        ll ans = 0;
        ans += get(best[i][k] , k + 1);
        ans %= mod;
        ans += get(best[i][k] , k);
        ans %= mod;
        return dp[i][k] = ans;
    }
}

void __sol(){
    cin >> n;
    vector<ll> v(n); cin >> v;
    forr(i,n+3) forr(j,n+3) best[i][j] = n+2;
    mem(dp,-1);
    for(int k=1;k<=n;k++){
        map<ll,int> m;
        ll sum = 0;
        m[sum] = n + 1;
        for(int j=n;j>=1;j--){
            sum += v[j-1]%k;
            sum %= k;
            if(m.count(sum)) best[j][k] = m[sum];
            m[sum] = j;
        }
    }
    cout << get(1,1)<<"\n";
    return;
}


int main(){ 
    fastio;
    int tc=1;  // cin >> tc;
    while(tc--) __sol();
    return 0;
}