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

#define int long long
#define forn(i,a,n) for (int i=a; i<n; i++)
#define mod 1000000007

//dp(i,j)
//i=until the ith element
//j=how many groups

int dp[3005][3005];
int su[3005],sum[3005];
int a[3005];

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0);

	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	
	int n;
	cin>>n;
	forn(i,1,n+1){
		cin>>a[i];
		su[i]=su[i-1]+a[i];
	}
	forn(j,1,n+1){ //groups
		memset(sum,0,sizeof sum);
		forn(i,1,n+1){
			if (j==1) dp[i][j]=1;
			else dp[i][j]=sum[su[i]%j]%mod;
			sum[su[i]%j]=(sum[su[i]%j]+dp[i][j-1])%mod;
		}
	}
	int ans=0;
	forn(j,1,n+1) ans=(ans+dp[n][j])%mod;
	cout<<ans<<endl;
	return 0;
}
#include <bits/stdc++.h>

#define ll long long
#define pi pair<int, int>
#define pf pair<float, int>
#define ps pair<string, int>
#define pii pair<int, pi>
#define mi map<int, int>
#define ml map<long long, int>
#define ms map<string, int>
#define mc map<char, int>
#define mpi map<pi, int>
#define F first
#define S second
#define vt vector
#define vi vector<int>
#define vd vector<double>
#define vf vector<float>
#define vl vector<long long>
#define vpi vector<pi>
#define vpf vector<pf>
#define vpii vector<pii>
#define st set
#define si set<int>
#define sd set<double>
#define sf set<float>
#define sl set<long long>

#define FOR(t, q) for(int q = 0; q < t; q++)
#define FORN(t, q, v) for(int q = v; q < t; q++)
#define sz(v) (int)(v.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define LOWER(s) transform(s.begin(), s.end(), s.begin(), ::tolower)
#define UPPER(s) transform(s.begin(), s.end(), s.begin(), ::toupper)
#define pb(s) push_back(s);

#define nl endl
#define TC int _t; cin >> _t; FOR(_t, _q)

using namespace std;

void solve() {
	string s; cin >> s;
	FOR(sz(s), i) {
		if (i % 2 == 0) {
			if (isupper(s[i])) goto L;
		} else {
			if (islower(s[i])) goto L;
		}
	}
	cout << "Yes";
	return;
	L: cout << "No";
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    // TC
    	solve();

    return 0;
}
