/*input
4 3 2
1 2 3 2
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie(0) , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define MAX (1 << 18) + 10
#define INF 0x3f3f3f3f
#define mod 1009
#define cplx complex<double>
const double PI = acos(-1);

vector<int> v[MAX];
cplx tmp[MAX] , x[MAX] , y[MAX] , w[MAX] , I(0 , 1);
int nn , base , maxn = (1 << 18);
void FFT(cplx now[MAX]){
	int siz = 0 , pat = (nn >> 1) - 1 , mul = 18 - base;
	RREP(i , base - 1 , 0){
		REP(j , 0 , nn){
			int fr = j >> i , ba = j & pat;
			int a = ((fr & siz) << 1 | 0) << i | ba;
			int b = ((fr & siz) << 1 | 1) << i | ba;
			tmp[j] = now[a] + now[b] * w[fr << i << mul];
		}
		REP(j , 0 , nn) now[j] = tmp[j];
		siz = (siz << 1 | 1) , pat >>= 1;
	}
}
void IFFT(cplx now[MAX]){
	FFT(now) , reverse(now + 1 , now + nn);
	REP(i , 0 , nn) now[i] /= nn;
}
void solve(int a , int b){
	base = 0;
	while((1 << base) < v[a].size() + v[b].size()) base ++ , nn = (1 << base);

	REP(i , 0 , nn){
		x[i] = i < v[a].size() ? cplx(v[a][i] , 0) : cplx(0 , 0);
		y[i] = i < v[b].size() ? cplx(v[b][i] , 0) : cplx(0 , 0);
	}
	FFT(x) , FFT(y);
	REP(i , 0 , nn) x[i] = x[i] * y[i];
	IFFT(x);

	v[a].clear();
	REP(i , 0 , nn) v[a].pb((long long)(x[i].real() + 0.5) % mod);
	while(v[a].back() == 0) v[a].pop_back();
}

int n , m , k , a[MAX] , cnt[MAX];
int32_t main(){
	IOS;
	cin >> n >> m >> k;
	REP(i , 1 , n + 1) cin >> a[i] , cnt[a[i]] ++;
	REP(i , 1 , m + 1) v[i].resize(cnt[i] + 1 , 1);

	REP(i , 0 , maxn) w[i] = exp(2 * PI * i / maxn * I);
	priority_queue<PII , vector<PII> , greater<PII>> pq;
	REP(i , 1 , m + 1) pq.push(mp(v[i].size() , i));
	while(pq.size() > 1){
		PII a = pq.top(); pq.pop();
		PII b = pq.top(); pq.pop();
		solve(a.B , b.B);
		pq.push(mp(v[a.B].size() , a.B));
	}
	cout << v[pq.top().B][k] << endl;
    return 0;
}


/*input
4 3 2
1 2 3 2
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define REP(i,j,k)     for(int i = j ; i < k ; ++i)
#define RREP(i,j,k)    for(int i = j ; i >=k ; --i)
#define A    first
#define B    second
#define mp   make_pair
#define pb   emplace_back
#define PII pair<int , int>
#define MEM(i,j)   memset(i , j , sizeof i)
#define ALL(i)     i.begin() , i.end()
#define DBGG(i,j)     cout << i << " " << j << endl
#define DB4(i,j,k,l)  cout << i << " " << j << " " << k << " " << l << endl
#define IOS cin.tie(0) , cout.sync_with_stdio(0)
#define endl "\n"
///------------------------------------------------------------
#define int long long
#define MAX (1 << 19) + 10
#define INF 0x3f3f3f3f
#define mod 1009
#define cplx complex<double>
const double PI = acos(-1);

vector<int> v[MAX];
cplx tmp[MAX] , x[MAX] , y[MAX] , w[MAX] , I(0 , 1);
int nn , base;
void FFT(cplx now[MAX]){
	int siz = 0 , pat = (nn >> 1) - 1;
	RREP(i , base - 1 , 0){
		REP(j , 0 , nn){
			int fr = j >> i , ba = j & pat;
			int a = ((fr & siz) << 1 | 0) << i | ba;
			int b = ((fr & siz) << 1 | 1) << i | ba;
			tmp[j] = now[a] + now[b] * w[fr << i];
		}
		REP(j , 0 , nn) now[j] = tmp[j];
		siz = (siz << 1 | 1) , pat >>= 1;
	}
}
void IFFT(cplx now[MAX]){
	FFT(now) , reverse(now + 1 , now + nn);
	REP(i , 0 , nn) now[i] /= nn;
}
void solve(int a , int b){
	base = 0;
	while((1LL << base) <= v[a].size() + v[b].size()) base ++;
	if((1LL << base) <= 100){
		vector<int> sol(v[a].size() + v[b].size());
		REP(i , 0 , v[a].size()) REP(j , 0 , v[b].size()) sol[i + j] += v[a][i] * v[b][j];
		REP(i , 0 , sol.size()) sol[i] %= mod;
		v[a] = sol;
		while(v[a].back() == 0) v[a].pop_back();
		return ;
	}
	if((1LL << base) != nn){
		nn = (1LL << base);
		REP(i , 0 , nn) w[i] = exp(2 * PI * i / nn * I);
	}
	REP(i , 0 , nn){
		x[i] = i < v[a].size() ? cplx(v[a][i] , 0) : cplx(0 , 0);
		y[i] = i < v[b].size() ? cplx(v[b][i] , 0) : cplx(0 , 0);
	}
	FFT(x) , FFT(y);
	REP(i , 0 , nn) x[i] = x[i] * y[i];
	IFFT(x);
	v[a].clear();
	REP(i , 0 , nn) v[a].pb((int)(x[i].real() + 0.5) % mod);
	while(v[a].back() == 0) v[a].pop_back();
}

int n , m , k , a[MAX] , cnt[MAX];
int32_t main(){
	IOS;
	cin >> n >> m >> k;
	REP(i , 1 , n + 1) cin >> a[i] , cnt[a[i]] ++;
	REP(i , 1 , m + 1) v[i].resize(cnt[i] + 1 , 1);
	priority_queue<PII , vector<PII> , greater<PII>> pq;
	REP(i , 1 , m + 1) pq.push(mp(v[i].size() , i));

	while(pq.size() > 1){
		PII a = pq.top(); pq.pop();
		PII b = pq.top(); pq.pop();
		solve(a.B , b.B);
		pq.push(mp(v[a.B].size() , a.B));
	}
	cout << v[pq.top().B][k] << endl;
    return 0;
}


#include <bits/stdc++.h>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <limits>
#include <map>
#include <vector>
#include <queue>
#define LL long long
#define ft first
#define sd second
#define P pair<int ,int >
#define mp(x,y) make_pair(x,y)
#define db double
//#define int LL
using namespace std;
const int N   = 1<<19;
const int mod = 1009;
//const int yg =11;
const db Pi=acos(-1.);
const int INF =numeric_limits<int >::max();
#define SZ(x) ((int)(x).size())
#define rep(i,x,y) for (int i=x;i<=y;++i)
typedef vector<int >  VI;
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}

int qsm(int a,int b)
{
    int tmp=1;
    while (b)
    {
        if (b&1) tmp=(1ll*tmp*a)%mod;
        b>>=1;
        a=(1ll*a*a)%mod;
    }
    return tmp;
}

int rev[N];
struct Com
{
	db x,y;
	Com(db x=0.0,db y=0.0):x(x),y(y){}
	Com operator -(const Com &b) const{return Com(x-b.x,y-b.y);}
	Com operator +(const Com &b) const{return Com(x+b.x,y+b.y);}
	Com operator *(const Com &b) const{return Com(x*b.x-y*b.y,x*b.y+y*b.x);}
}a[N],b[N],c[N];

void FFT(Com*a,int n,int f)
{
   rep(i,0,n-1) if (i<rev[i]) swap(a[i],a[rev[i]]);
   for (int i=1;i<n;i<<=1)
   {
   //	rep(j,0,n-1)printf("%.8f %.8f\n",a[j].x,a[j].y);printf("\n\n");
   	 Com wn=Com(cos(Pi/i),sin(Pi/i)),x,y;
   	 for (int j=0;j<n;j+=(i<<1))
   	 {
   	 	Com w=Com(1,0);
   	 	//printf("--w-- %.8f %.8f\n",w.x,w.y);
   	 	for (int k=0;k<i;++k,w=w*wn)
   	 	{
		//	printf("--w-- %.8f %.8f\n",w.x,w.y);
   	 		x=a[j+k];y=a[i+j+k]*w;
   	 	//	printf("--x-- %.8f %.8f\n",x.x,x.y);
   	 	//	printf("--y-- %.8f %.8f\n",y.x,y.y);
   	 		a[j+k]=x+y;
   	 		a[i+j+k]=x-y;
   	 	}
   	 }
   }
   //rep(j,0,n-1)printf("%.8f %.8f\n",a[j].x,a[j].y);printf("\n\n");
   if (f==1) return ;reverse(a+1,a+n);
   rep(i,0,n-1) a[i].x/=n,a[i].y/=n;
}

int ans[N],L,g,n,m,k,x,cnt[N];
VI poly[N];
set <P> s;

void mul(int A,int B)
{
	int l=SZ(poly[A]),r=SZ(poly[B]);//--l,--r;
	rep(i,0,l-1) a[i]=Com(poly[A][i],0);
	rep(j,0,r-1) b[j]=Com(poly[B][j],0);
	for (L=1,g=0;L<=(l+r-1);L<<=1,++g);
	rep(i,l,L-1) a[i]=Com(0,0);
	rep(i,r,L-1) b[i]=Com(0,0);
	rep(i,0,L-1) rev[i]=(rev[i>>1]>>1)|((i&1)<<(g-1));
	//rep(i,0,L-1) r[i]=(r[i>>1]>>1)|((i&1)<<(g-1));
	FFT(a,L,1);FFT(b,L,1);
	//for(int i = 0;i < L;i++)  printf("%.8f %.8f\n",a[i].x,a[i].y);printf("\n\n");
    //for(int i = 0;i < L;i++)  printf("%.8f %.8f\n",a[i].x,a[i].y);
	rep(i,0,L-1) c[i]=a[i]*b[i];
	FFT(c,L,-1);
	VI C(l+r-1,0);
	rep(i,0,l+r-2) C[i]=((LL)(c[i].x+0.5))%mod;
	//printf("--%d --\n",);
//		for (int i=0;i<C.size();++i) printf("%d ",C[i]);
	//	putchar('\n');
	poly[m]=C;
	return ;
}
VI tmp;
signed main()
{
	//freopen("data.txt","r",stdin);
	//freopen("Moon.txt","w",stdout);
	read(n);read(m);read(k);
	rep(i,1,n) read(x),cnt[x]++;

	rep(i,1,m) if (cnt[i])
	{
		poly[i]=VI(cnt[i]+1,1);
		s.insert(mp(cnt[i]+1,i));
	}
	++m;
	while (SZ(s)>1)
	{
		int u=s.begin()->sd;s.erase(s.begin());
		int v=s.begin()->sd;s.erase(s.begin());
	/*	printf("--%d --\n",u);
		for (int i=0;i<(int)poly[u].size();++i) printf("%d ",poly[u][i]);
		putchar('\n');
		printf("--%d --\n",v);
		for (int i=0;i<(int)poly[v].size();++i) printf("%d ",poly[v][i]);
		putchar('\n');*/

		mul(u,v);
		/*printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		printf("\n\n");*/
		s.insert(mp(SZ(poly[m]),m));
		++m;
	}
	//int hh=s.begin()->sd;
//	m=s.begin()->sd;
/*	printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		putchar('\n');*/
		//rep(i,1,n)
	printf("%d",poly[s.begin()->sd][k]);
	return 0;
}


#include <bits/stdc++.h>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <limits>
#include <map>
#include <vector>
#include <queue>
#define LL long long
#define ft first
#define sd second
#define P pair<int ,int >
#define mp(x,y) make_pair(x,y)
#define db double
//#define int LL
using namespace std;
const int N   = 1<<19;
const int mod = 998244353;
const int yg =3;
const int INF =numeric_limits<int >::max();
#define SZ(x) ((int)(x).size())
#define rep(i,x,y) for (int i=x;i<=y;++i)
typedef vector<int >  VI;
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}

int qsm(int a,int b)
{
	int tmp=1;
	while (b)
	{
		if (b&1) tmp=1ll*tmp*a%mod;
		a=1ll*a*a%mod;
		b>>=1;
	}
	return tmp;
}

int a[N],b[N],c[N],rev[N];
void NTT(int *a,int n,int f)
{
    //n=N;
    rep(i,0,n-1)  if (i< rev[i]) swap(a[i],a[rev[i]]);
    for (int i=1;i<n;i<<=1)
    {
        int wn=qsm(yg,(mod-1)/(i<<1)),x,y;
        for (int j=0;j<n;j+=(i<<1))
          {
              int w=1;
              for (int k=0;k<i;++k,w=1ll*w*wn%mod)
              {
                  x=a[j+k];y=1ll*w*a[i+j+k]%mod;
                  a[j+k]=(x+y)%mod;
                  a[i+j+k]=(x-y+mod)%mod;
              }
          }
    }
    if (f==1) return ;
    int inv=qsm(n,mod-2);reverse(a+1,a+n);
    rep(i,0,n-1)
    a[i]=1ll*a[i]*inv%mod;
}

int ans[N],L,g,n,m,k,x,cnt[N];
VI poly[N];
set <P> s;

void mul(int A,int B)
{
	int l=SZ(poly[A]),r=SZ(poly[B]);//--l,--r;
	rep(i,0,l-1) a[i]=poly[A][i];
	rep(j,0,r-1) b[j]=poly[B][j];
	for (L=1,g=0;L<=(l+r-1);L<<=1,++g);
	rep(i,l,L-1) a[i]=0;
	rep(i,r,L-1) b[i]=0;
	rep(i,1,L) rev[i]=(rev[i>>1]>>1)|((i&1)<<(g-1));
	NTT(a,L,1);NTT(b,L,1);
	rep(i,0,L-1) c[i]=1ll*a[i]*b[i]%mod;
	NTT(c,L,-1);
	VI C(l+r-1,0);
	rep(i,0,l+r-2) C[i]=c[i];
	//printf("--%d --\n",);
//		for (int i=0;i<C.size();++i) printf("%d ",C[i]);
	//	putchar('\n');
	poly[m]=C;
	return ;
}
VI tmp;
signed main()
{

	read(n);read(m);read(k);
	rep(i,1,n) read(x),cnt[x]++;

	rep(i,1,m) if (cnt[i])
	{
		poly[i]=VI(cnt[i]+1,1);
		s.insert(mp(cnt[i]+1,i));
	}
	++m;
	while (SZ(s)>1)
	{
		int u=s.begin()->sd;s.erase(s.begin());
		int v=s.begin()->sd;s.erase(s.begin());
	/*	printf("--%d --\n",u);
		for (int i=0;i<(int)poly[u].size();++i) printf("%d ",poly[u][i]);
		putchar('\n');
		printf("--%d --\n",v);
		for (int i=0;i<(int)poly[v].size();++i) printf("%d ",poly[v][i]);
		putchar('\n');*/

		mul(u,v);
		/*printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		printf("\n\n");*/
		s.insert(mp(SZ(poly[m]),m));
		++m;
	}
	//int hh=s.begin()->sd;
//	m=s.begin()->sd;
/*	printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		putchar('\n');*/
		//rep(i,1,n)
	printf("%d",poly[s.begin()->sd][k]);
	return 0;
}


#include <bits/stdc++.h>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <limits>
#include <map>
#include <vector>
#include <queue>
#define LL long long
#define ft first
#define sd second
#define P pair<int ,int >
#define mp(x,y) make_pair(x,y)
#define db double
//#define int LL
using namespace std;
const int N   = 1<<19;
const int mod = 1009;
const int yg =11;
const int INF =numeric_limits<int >::max();
#define SZ(x) ((int)(x).size())
#define rep(i,x,y) for (int i=x;i<=y;++i)
typedef vector<int >  VI;
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}

int qsm(int a,int b)
{
	int tmp=1;
	while (b)
	{
		if (b&1) tmp=1ll*tmp*a%mod;
		a=1ll*a*a%mod;
		b>>=1;
	}
	return tmp;
}

int a[N],b[N],c[N],rev[N];
void NTT(int *a,int n,int f)
{
    //n=N;
    rep(i,0,n-1)  if (i< rev[i]) swap(a[i],a[rev[i]]);
    for (int i=1;i<n;i<<=1)
    {
        int wn=qsm(yg,(mod-1)/(i<<1)),x,y;
        for (int j=0;j<n;j+=(i<<1))
          {
              int w=1;
              for (int k=0;k<i;++k,w=1ll*w*wn%mod)
              {
                  x=a[j+k];y=1ll*w*a[i+j+k]%mod;
                  a[j+k]=(x+y)%mod;
                  a[i+j+k]=(x-y+mod)%mod;
              }
          }
    }
    if (f==1) return ;
    int inv=qsm(n,mod-2);reverse(a+1,a+n);
    rep(i,0,n-1)
    a[i]=1ll*a[i]*inv%mod;
}

int ans[N],L,g,n,m,k,x,cnt[N];
VI poly[N];
set <P> s;

void mul(int A,int B)
{
	int l=SZ(poly[A]),r=SZ(poly[B]);//--l,--r;
	rep(i,0,l-1) a[i]=poly[A][i];
	rep(j,0,r-1) b[j]=poly[B][j];
	for (L=1,g=0;L<=(l+r);L<<=1,++g);
	rep(i,l,L-1) a[i]=0;
	rep(i,r,L-1) b[i]=0;
	rep(i,1,L) rev[i]=(rev[i>>1]>>1)|((i&1)<<(g-1));
	NTT(a,L,1);NTT(b,L,1);
	rep(i,0,L-1) c[i]=1ll*a[i]*b[i]%mod;
	NTT(c,L,-1);
	VI C(l+r-1,0);
	rep(i,0,l+r-2) C[i]=c[i];
	//printf("--%d --\n",);
//		for (int i=0;i<C.size();++i) printf("%d ",C[i]);
	//	putchar('\n');
	poly[m]=C;
	return ;
}
VI tmp;
signed main()
{
	read(n);read(m);read(k);
	rep(i,1,n) read(x),cnt[x]++;

	rep(i,1,m) if (cnt[i])
	{
		poly[i]=VI(cnt[i]+1,1);
		s.insert(mp(cnt[i]+1,i));
	}
	++m;
	while (SZ(s)>1)
	{
		int u=s.begin()->sd;s.erase(s.begin());
		int v=s.begin()->sd;s.erase(s.begin());
	/*	printf("--%d --\n",u);
		for (int i=0;i<(int)poly[u].size();++i) printf("%d ",poly[u][i]);
		putchar('\n');
		printf("--%d --\n",v);
		for (int i=0;i<(int)poly[v].size();++i) printf("%d ",poly[v][i]);
		putchar('\n');*/

		mul(u,v);
		/*printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		printf("\n\n");*/
		s.insert(mp(SZ(poly[m]),m));
		++m;
	}
	//int hh=s.begin()->sd;
	m=s.begin()->sd;
/*	printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		putchar('\n');*/
		//rep(i,1,n)
	printf("%d",poly[s.begin()->sd][k]);
	return 0;
}


#include <bits/stdc++.h>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <limits>
#include <map>
#include <vector>
#include <queue>
#define LL long long
#define ft first
#define sd second
#define P pair<int ,int >
#define mp(x,y) make_pair(x,y)
#define db double
//#define int LL
using namespace std;
const int N   = 1<<19;
const int mod = 1009;
const int yg =11;
const int INF =numeric_limits<int >::max();
#define SZ(x) ((int)(x).size())
#define rep(i,x,y) for (int i=x;i<=y;++i)
typedef vector<int >  VI;
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}

int qsm(int a,int b)
{
	int tmp=1;
	while (b)
	{
		if (b&1) tmp=1ll*tmp*a%mod;
		a=1ll*a*a%mod;
		b>>=1;
	}
	return tmp;
}

int a[N],b[N],c[N],rev[N];
void NTT(int *a,int n,int f)
{
    //n=N;
    rep(i,0,n-1)  if (i< rev[i]) swap(a[i],a[rev[i]]);
    for (int i=1;i<n;i<<=1)
    {
        int wn=qsm(yg,(mod-1)/(i<<1)),x,y;
        for (int j=0;j<n;j+=(i<<1))
          {
              int w=1;
              for (int k=0;k<i;++k,w=1ll*w*wn%mod)
              {
                  x=a[j+k];y=1ll*w*a[i+j+k]%mod;
                  a[j+k]=(x+y)%mod;
                  a[i+j+k]=(x-y+mod)%mod;
              }
          }
    }
    if (f==1) return ;
    int inv=qsm(n,mod-2);reverse(a+1,a+n);
    rep(i,0,n-1)
    a[i]=1ll*a[i]*inv%mod;
}

int ans[N],L,g,n,m,k,x,cnt[N];
VI poly[N];
set <P> s;

void mul(int A,int B)
{
	int l=SZ(poly[A]),r=SZ(poly[B]);//--l,--r;
	rep(i,0,l-1) a[i]=poly[A][i];
	rep(j,0,r-1) b[j]=poly[B][j];
	for (L=1,g=0;L<=(l+r-1);L<<=1,++g);
	rep(i,l,L-1) a[i]=0;
	rep(i,r,L-1) b[i]=0;
	rep(i,1,L) rev[i]=(rev[i>>1]>>1)|((i&1)<<(g-1));
	NTT(a,L,1);NTT(b,L,1);
	rep(i,0,L-1) c[i]=1ll*a[i]*b[i]%mod;
	NTT(c,L,-1);
	VI C(l+r-1,0);
	rep(i,0,l+r-2) C[i]=c[i];
	//printf("--%d --\n",);
//		for (int i=0;i<C.size();++i) printf("%d ",C[i]);
	//	putchar('\n');
	poly[m]=C;
	return ;
}
VI tmp;
signed main()
{
	read(n);read(m);read(k);
	rep(i,1,n) read(x),cnt[x]++;

	rep(i,1,m) if (cnt[i])
	{
		poly[i]=VI(cnt[i]+1,1);
		s.insert(mp(cnt[i]+1,i));
	}
	++m;
	while (SZ(s)>1)
	{
		int u=s.begin()->sd;s.erase(s.begin());
		int v=s.begin()->sd;s.erase(s.begin());
	/*	printf("--%d --\n",u);
		for (int i=0;i<(int)poly[u].size();++i) printf("%d ",poly[u][i]);
		putchar('\n');
		printf("--%d --\n",v);
		for (int i=0;i<(int)poly[v].size();++i) printf("%d ",poly[v][i]);
		putchar('\n');*/

		mul(u,v);
		/*printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		printf("\n\n");*/
		s.insert(mp(SZ(poly[m]),m));
		++m;
	}
	//int hh=s.begin()->sd;
	m=s.begin()->sd;
/*	printf("--%d --\n",m);
		for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
		putchar('\n');*/
		//rep(i,1,n)
	printf("%d",poly[s.begin()->sd][k]);
	return 0;
}


#include <bits/stdc++.h>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <limits>
#include <map>
#include <vector>
#include <queue>
#define LL long long
#define ft first
#define sd second
#define P pair<int ,int >
#define mp(x,y) make_pair(x,y)
#define db double
//#define int LL
using namespace std;
const int N   = 1<<19;
const int mod = 1009;
const int yg =11;
const int INF =numeric_limits<int >::max();
#define SZ(x) ((int)(x).size())
#define rep(i,x,y) for (int i=x;i<=y;++i)
typedef vector<int >  VI;
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}

int qsm(int a,int b)
{
	int tmp=1;
	while (b)
	{
		if (b&1) tmp=1ll*tmp*a%mod;
		a=1ll*a*a%mod;
		b>>=1;
	}
	return tmp;
}

int a[N],b[N],c[N],rev[N];
void NTT(int *a,int n,int f)
{
    //n=N;
    rep(i,0,n-1)  if (i< rev[i]) swap(a[i],a[rev[i]]);
    for (int i=1;i<n;i<<=1)
    {
        int wn=qsm(yg,(mod-1)/(i<<1)),x,y;
        for (int j=0;j<n;j+=(i<<1))
          {
              int w=1;
              for (int k=0;k<i;++k,w=1ll*w*wn%mod)
              {
                  x=a[j+k];y=1ll*w*a[i+j+k]%mod;
                  a[j+k]=(x+y)%mod;
                  a[i+j+k]=(x-y+mod)%mod;
              }
          }
    }
    if (f==1) return ;
    int inv=qsm(n,mod-2);reverse(a+1,a+n);
    rep(i,0,n-1)
    a[i]=1ll*a[i]*inv%mod;
}

int ans[N],L,g,n,m,k,x,cnt[N];
VI poly[N];
set <P> s;

void mul(int A,int B)
{
	int l=SZ(poly[A]),r=SZ(poly[B]);//--l,--r;
	rep(i,0,l-1) a[i]=poly[A][i];
	rep(j,0,r-1) b[j]=poly[B][j];
	for (L=1,g=0;L<=(l+r)*2;L<<=1,++g);
	rep(i,l,L-1) a[i]=0;
	rep(i,r,L-1) b[i]=0;
	rep(i,1,L) rev[i]=(rev[i>>1]>>1)|((i&1)<<(g-1));
	NTT(a,L,1);NTT(b,L,1);
	rep(i,0,L-1) c[i]=a[i]*b[i]%mod;
	NTT(c,L,-1);
	VI C(l+r-1,0);
	rep(i,0,l+r-2) C[i]=c[i];
	//printf("--%d --\n",);
//		for (int i=0;i<C.size();++i) printf("%d ",C[i]);
	//	putchar('\n');
	poly[m]=C;
	return ;
}
VI tmp;
signed main()
{
	read(n);read(m);read(k);
	rep(i,1,n) read(x),cnt[x]++;

	rep(i,1,m) if (cnt[i])
	{
		poly[i]=VI(cnt[i]+1,1);
		s.insert(mp(cnt[i]+1,i));
	}
	++m;
	while (SZ(s)>1)
	{
		int u=s.begin()->sd;s.erase(s.begin());
		int v=s.begin()->sd;s.erase(s.begin());
	//	printf("--%d --\n",u);
	//	for (int i=0;i<(int)poly[u].size();++i) printf("%d ",poly[u][i]);
	//	putchar('\n');
	//	printf("--%d --\n",v);
	//	for (int i=0;i<(int)poly[v].size();++i) printf("%d ",poly[v][i]);
	//	putchar('\n');

		mul(u,v);
	//	printf("--%d --\n",m);
	//	for (int i=0;i<(int)poly[m].size();++i) printf("%d ",poly[m][i]);
	//	putchar('\n');
	//	rep(i,1,n)
		s.insert(mp(SZ(poly[m]),m));
		++m;
	}
	//int hh=s.begin()->sd;
	printf("%d",poly[s.begin()->sd][k]);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int MAXBUF=1<<19;
char B[MAXBUF],*Si=B,*Ti=B;
inline char getc()
{if (Si==Ti) Ti=Si+fread(B,1,MAXBUF,stdin);
if (Si==Ti) return 0;
return *Si++;
}
template <class T>
inline void read(T &a)
{static char c;
while ((c=getc())<'0'||c>'9');a=c-'0';
while ((c=getc())>='0'&&c<='9') a=(a<<3)+(a<<1)+c-'0';
}
struct cpx
{double r,i;
cpx (double real=0.0,double image=0.0) {r=real;i=image;}
cpx operator+(cpx &a) {return cpx(r+a.r,i+a.i);}
cpx operator-(cpx &a) {return cpx(r-a.r,i-a.i);}
cpx operator*(cpx &a) {return cpx(r*a.r-i*a.i,r*a.i+i*a.r);}
}wo[19][300005];
const double pi=acos(-1.0);
struct poly
{vector <cpx> vec;
int sz;
};
struct cmp
{bool operator () (poly a,poly b)
{return a.sz>b.sz;}
};
priority_queue <poly,vector<poly>,cmp> q;
int t[200005],n,m,k,mx=1;
inline poly make(int t)
{poly tp;
tp.sz=t+1;tp.vec.resize(t+1);
for (int i=0;i<=t;i++) tp.vec[i]=cpx(1,0);
return tp;
}
inline void change(poly &y,int len)
{int i,j,k;
for (i=1,j=(len>>1);i<len-1;i++)
{if (i<j) swap(y.vec[i],y.vec[j]);
k=len>>1;
while (j>=k) {j-=k;k>>=1;}
j+=k;
}
}
inline void fft(poly &y,int len,int f)
{int h,i,j,t;
change(y,len);
for (h=2,t=1;h<=len;h<<=1,t++)
{for (i=0;i<len;i+=h)
{for (j=0;j<(h>>1);j++)
{cpx u=y.vec[i+j],v=y.vec[i+j+(h>>1)]*wo[t][j];
y.vec[i+j]=u+v;y.vec[i+j+(h>>1)]=u-v;
}
}
}
if (f==-1)
{double inv=1.0/((double)(len));
for (i=1;i<(len>>1);i++) swap(y.vec[i],y.vec[len-i]);
for (i=0;i<len;i++) y.vec[i].r*=inv;
}
}
inline poly mult(poly p1,poly p2)
{poly a,b;
int len=1,i;
while (len<p1.sz+p2.sz-1) len<<=1;
a.vec.resize(len);
b.vec.resize(len);
for (i=0;i<len;i++) a.vec[i]=b.vec[i]=cpx(0,0);
for (i=0;i<p1.sz;i++) a.vec[i]=p1.vec[i];//,cerr<<a.vec[i].r<<' ';cerr<<endl;
for (i=0;i<p2.sz;i++) b.vec[i]=p2.vec[i];//,cerr<<b.vec[i].r<<' ';cerr<<endl;
fft(a,len,1);fft(b,len,1);
for (i=0;i<len;i++) b.vec[i]=a.vec[i]*b.vec[i];
fft(b,len,-1);
for (i=0;i<len;i++)
{b.vec[i].i=0;
b.vec[i].r=((int)(b.vec[i].r+0.5))%1009;
//cerr<<b.vec[i].r<<' ';
}
//cerr<<endl;
b.sz=p1.sz+p2.sz-1;
return b;
}
int main (){
	int i,j,x;
	read(n);read(m);read(k);
	for (i=1;i<=n;i++) {read(x);t[x]++;}
	while (mx<=n) mx<<=1;
	for (j=1;(1<<j)<=mx;j++)
	{cpx o(cos(-2.0*pi/(1<<j)),sin(-2.0*pi/(1<<j)));wo[j][0]=cpx(1,0);
	for (i=1;i<(1<<(j-1));i++) wo[j][i]=wo[j][i-1]*o;
	}
	for (i=1;i<=m;i++) q.push(make(t[i]));
	while (q.size()>=2)
	{poly t1=q.top();q.pop();
	poly t2=q.top();q.pop();
	poly res=mult(t1,t2);
	q.push(res);
	}
	poly ans=q.top();
	printf ("%d\n",((int)(ans.vec[k].r+0.5)));
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXBUF=1<<22;
char B[MAXBUF],*Si=B,*Ti=B;
inline char getc()
{if (Si==Ti) Ti=Si+fread(B,1,MAXBUF,stdin);
if (Si==Ti) return 0;
return *Si++;
}
template <class T>
inline void read(T &a)
{static char c;
while ((c=getc())<'0'||c>'9');a=c-'0';
while ((c=getc())>='0'&&c<='9') a=(a<<3)+(a<<1)+c-'0';
}
struct cpx
{double r,i;
cpx (double real=0.0,double image=0.0) {r=real;i=image;}
cpx operator+(cpx &a) {return cpx(r+a.r,i+a.i);}
cpx operator-(cpx &a) {return cpx(r-a.r,i-a.i);}
cpx operator*(cpx &a) {return cpx(r*a.r-i*a.i,r*a.i+i*a.r);}
}wo[19][300005];
const double pi=acos(-1.0);
struct poly
{vector <cpx> vec;
int sz;
};
struct cmp
{bool operator () (poly a,poly b)
{return a.sz>b.sz;}
};
priority_queue <poly,vector<poly>,cmp> q;
int t[200005],n,m,k,mx=1;
inline poly make(int t)
{poly tp;
tp.sz=t+1;tp.vec.resize(t+1);
for (int i=0;i<=t;i++) tp.vec[i]=cpx(1,0);
return tp;
}
inline void change(poly &y,int len)
{int i,j,k;
for (i=1,j=(len>>1);i<len-1;i++)
{if (i<j) swap(y.vec[i],y.vec[j]);
k=len>>1;
while (j>=k) {j-=k;k>>=1;}
j+=k;
}
}
inline void fft(poly &y,int len,int f)
{int h,i,j,t;
change(y,len);
for (h=2,t=1;h<=len;h<<=1,t++)
{for (i=0;i<len;i+=h)
{for (j=0;j<(h>>1);j++)
{cpx u=y.vec[i+j],v=y.vec[i+j+(h>>1)]*wo[t][j];
y.vec[i+j]=u+v;y.vec[i+j+(h>>1)]=u-v;
}
}
}
if (f==-1)
{double inv=1.0/((double)(len));
for (i=1;i<(len>>1);i++) swap(y.vec[i],y.vec[len-i]);
for (i=0;i<len;i++) y.vec[i].r*=inv;
}
}
inline poly mult(poly p1,poly p2)
{poly a,b;
int len=1,i;
while (len<p1.sz+p2.sz-1) len<<=1;
a.vec.resize(len);
b.vec.resize(len);
for (i=0;i<len;i++) a.vec[i]=b.vec[i]=cpx(0,0);
for (i=0;i<p1.sz;i++) a.vec[i]=p1.vec[i];//,cerr<<a.vec[i].r<<' ';cerr<<endl;
for (i=0;i<p2.sz;i++) b.vec[i]=p2.vec[i];//,cerr<<b.vec[i].r<<' ';cerr<<endl;
fft(a,len,1);fft(b,len,1);
for (i=0;i<len;i++) b.vec[i]=a.vec[i]*b.vec[i];
fft(b,len,-1);
for (i=0;i<len;i++)
{b.vec[i].i=0;
b.vec[i].r=((ll)(b.vec[i].r+0.5))%1009;
//cerr<<b.vec[i].r<<' ';
}
//cerr<<endl;
b.sz=p1.sz+p2.sz-1;
return b;
}
int main (){
	int i,j,x;
	read(n);read(m);read(k);
	for (i=1;i<=n;i++) {read(x);t[x]++;}
	while (mx<=n) mx<<=1;
	for (j=1;(1<<j)<=mx;j++)
	{cpx o(cos(-2.0*pi/(1<<j)),sin(-2.0*pi/(1<<j)));wo[j][0]=cpx(1,0);
	for (i=1;i<(1<<(j-1));i++) wo[j][i]=wo[j][i-1]*o;
	}
	for (i=1;i<=m;i++) q.push(make(t[i]));
	while (q.size()>=2)
	{poly t1=q.top();q.pop();
	poly t2=q.top();q.pop();
	poly res=mult(t1,t2);
	q.push(res);
	}
	poly ans=q.top();
	printf ("%d\n",((int)(ans.vec[k].r+0.5)));
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXBUF=1<<19;
char B[MAXBUF],*Si=B,*Ti=B;
inline char getc()
{if (Si==Ti) Ti=(Si=B)+fread(B,1,MAXBUF,stdin);
if (Si==Ti) return 0;
return *Si++;
}
template <class T>
inline void read(T &a)
{static char c;
while ((c=getc())<'0'||c>'9');a=c-'0';
while ((c=getc())>='0'&&c<='9') a=(a<<3)+(a<<1)+c-'0';
}
struct cpx
{double r,i;
cpx (double real=0.0,double image=0.0) {r=real;i=image;}
cpx operator+(cpx &a) {return cpx(r+a.r,i+a.i);}
cpx operator-(cpx &a) {return cpx(r-a.r,i-a.i);}
cpx operator*(cpx &a) {return cpx(r*a.r-i*a.i,r*a.i+i*a.r);}
}wo[19][300005];
const double pi=acos(-1.0);
struct poly
{vector <cpx> vec;
int sz;
};
struct cmp
{bool operator () (poly a,poly b)
{return a.sz>b.sz;}
};
priority_queue <poly,vector<poly>,cmp> q;
int t[200005],n,m,k,mx=1;
inline poly make(int t)
{poly tp;
tp.sz=t+1;tp.vec.resize(t+1);
for (int i=0;i<=t;i++) tp.vec[i]=cpx(1,0);
return tp;
}
inline void change(poly &y,int len)
{int i,j,k;
for (i=1,j=(len>>1);i<len-1;i++)
{if (i<j) swap(y.vec[i],y.vec[j]);
k=len>>1;
while (j>=k) {j-=k;k>>=1;}
j+=k;
}
}
inline void fft(poly &y,int len,int f)
{int h,i,j,t;
change(y,len);
for (h=2,t=1;h<=len;h<<=1,t++)
{for (i=0;i<len;i+=h)
{for (j=0;j<(h>>1);j++)
{cpx u=y.vec[i+j],v=y.vec[i+j+(h>>1)]*wo[t][j];
y.vec[i+j]=u+v;y.vec[i+j+(h>>1)]=u-v;
}
}
}
if (f==-1)
{double inv=1.0/((double)(len));
for (i=1;i<(len>>1);i++) swap(y.vec[i],y.vec[len-i]);
for (i=0;i<len;i++) y.vec[i].r*=inv;
}
}
inline poly mult(poly p1,poly p2)
{poly a,b;
int len=1,i;
while (len<p1.sz+p2.sz-1) len<<=1;
a.vec.resize(len);b.vec.resize(len);
for (i=0;i<len;i++) a.vec[i]=b.vec[i]=cpx(0,0);
for (i=0;i<p1.sz;i++) a.vec[i]=p1.vec[i];
for (i=0;i<p2.sz;i++) b.vec[i]=p2.vec[i];
fft(a,len,1);fft(b,len,1);
for (i=0;i<len;i++) b.vec[i]=a.vec[i]*b.vec[i];
fft(b,len,-1);
for (i=0;i<len;i++)
{b.vec[i].i=0;b.vec[i].r=((ll)(b.vec[i].r+0.5))%1009;}
b.sz=p1.sz+p2.sz-1;
return b;
}
int main (){
	int i,j,x;
	read(n);read(m);read(k);
	for (i=1;i<=n;i++) {read(x);t[x]++;}
	while (mx<=n) mx<<=1;
	for (j=1;(1<<j)<=mx;j++)
	{cpx o(cos(-2.0*pi/(1<<j)),sin(-2.0*pi/(1<<j)));wo[j][0]=cpx(1,0);
	for (i=1;i<(1<<(j-1));i++) wo[j][i]=wo[j][i-1]*o;
	}
	for (i=1;i<=m;i++) q.push(make(t[i]));
	while (q.size()>=2)
	{poly t1=q.top();q.pop();
	poly t2=q.top();q.pop();
	poly res=mult(t1,t2);
	q.push(res);
	}
	poly ans=q.top();
	printf ("%d\n",((int)(ans.vec[k].r+0.5)));
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int MAXBUF=1<<22;
char B[MAXBUF],*Si=B,*Ti=B;
inline char getc()
{if (Si==Ti) Ti=Si+fread(B,1,MAXBUF,stdin);
if (Si==Ti) return 0;
return *Si++;
}
template <class T>
inline void read(T &a)
{static char c;
while ((c=getc())<'0'||c>'9');a=c-'0';
while ((c=getc())>='0'&&c<='9') a=(a<<3)+(a<<1)+c-'0';
}
struct cpx
{double r,i;
cpx (double real=0.0,double image=0.0) {r=real;i=image;}
cpx operator+(cpx &a) {return cpx(r+a.r,i+a.i);}
cpx operator-(cpx &a) {return cpx(r-a.r,i-a.i);}
cpx operator*(cpx &a) {return cpx(r*a.r-i*a.i,r*a.i+i*a.r);}
}wo[19][300005];
const double pi=acos(-1.0);
struct poly
{vector <cpx> vec;
int sz;
};
struct cmp
{bool operator () (poly a,poly b)
{return a.sz>b.sz;}
};
priority_queue <poly,vector<poly>,cmp> q;
int t[200005],n,m,k,mx=1;
inline poly make(int t)
{poly tp;
tp.sz=t+1;tp.vec.resize(t+1);
for (int i=0;i<=t;i++) tp.vec[i]=cpx(1,0);
return tp;
}
inline void change(poly &y,int len)
{int i,j,k;
for (i=1,j=(len>>1);i<len-1;i++)
{if (i<j) swap(y.vec[i],y.vec[j]);
k=len>>1;
while (j>=k) {j-=k;k>>=1;}
j+=k;
}
}
inline void fft(poly &y,int len,int f)
{int h,i,j,t;
change(y,len);
for (h=2,t=1;h<=len;h<<=1,t++)
{for (i=0;i<len;i+=h)
{for (j=0;j<(h>>1);j++)
{cpx u=y.vec[i+j],v=y.vec[i+j+(h>>1)]*wo[t][j];
y.vec[i+j]=u+v;y.vec[i+j+(h>>1)]=u-v;
}
}
}
if (f==-1)
{double inv=1.0/((double)(len));
for (i=1;i<(len>>1);i++) swap(y.vec[i],y.vec[len-i]);
for (i=0;i<len;i++) y.vec[i].r*=inv;
}
}
inline poly mult(poly p1,poly p2)
{poly a,b;
int len=1,i;
while (len<p1.sz+p2.sz-1) len<<=1;
a.vec.resize(len);
b.vec.resize(len);
for (i=0;i<len;i++) a.vec[i]=b.vec[i]=cpx(0,0);
for (i=0;i<p1.sz;i++) a.vec[i]=p1.vec[i];//,cerr<<a.vec[i].r<<' ';cerr<<endl;
for (i=0;i<p2.sz;i++) b.vec[i]=p2.vec[i];//,cerr<<b.vec[i].r<<' ';cerr<<endl;
fft(a,len,1);fft(b,len,1);
for (i=0;i<len;i++) b.vec[i]=a.vec[i]*b.vec[i];
fft(b,len,-1);
for (i=0;i<len;i++)
{b.vec[i].i=0;
b.vec[i].r=((int)(b.vec[i].r+0.5))%1009;
//cerr<<b.vec[i].r<<' ';
}
//cerr<<endl;
b.sz=p1.sz+p2.sz-1;
return b;
}
int main (){
	int i,j,x;
	read(n);read(m);read(k);
	for (i=1;i<=n;i++) {read(x);t[x]++;}
	while (mx<=n) mx<<=1;
	for (j=1;(1<<j)<=mx;j++)
	{cpx o(cos(-2.0*pi/(1<<j)),sin(-2.0*pi/(1<<j)));wo[j][0]=cpx(1,0);
	for (i=1;i<(1<<(j-1));i++) wo[j][i]=wo[j][i-1]*o;
	}
	for (i=1;i<=m;i++) q.push(make(t[i]));
	while (q.size()>=2)
	{poly t1=q.top();q.pop();
	poly t2=q.top();q.pop();
	poly res=mult(t1,t2);
	q.push(res);
	}
	poly ans=q.top();
	printf ("%d\n",((int)(ans.vec[k].r+0.5)));
	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<ld>;

const ll MOD = pow(10,3)+9;
const ld FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		ld ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
vector<T> multiply(vector<T> const &izq, vector<T> const &der)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fDer(der.begin(), der.end());
	int n = izq.size() + der.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fDer.resize(pot_2);

	fft(fIzq);
	fft(fDer);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fDer[i];
	}

	fft(fIzq, true);

	vector<T> prod(n);
	fort(i, prod.size())
	{
		prod[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		prod[i] = ((prod[i] % MOD) + MOD ) % MOD;
	}

	return prod;
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	fort(s,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<ll> acum(1,1);
	for(auto kv : sabersCuantity)
	{
		vector<ll> saberColorPol(min(kv.second+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		acum = multiply(saberColorPol, acum);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<float>;

const ll MOD = pow(10,3)+9;
const float FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		float ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
void multiply(vector<T> const &izq, vector<T> &acum, int limit_prod)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fAcum(acum.begin(), acum.end());
	int n = izq.size() + acum.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fAcum.resize(pot_2);

	fft(fIzq);
	fft(fAcum);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fAcum[i];
	}

	fft(fIzq, true);

	acum.resize(min(n, limit_prod));
	fort(i, acum.size())
	{
		acum[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		acum[i] = ((acum[i] % MOD) + MOD ) % MOD;
	}
}

vector<ll> DOIT(vector<ll> &v, vector<ll> &w, ll mod){
	int n = 1;
	while(n < max(v.size(), w.size())) n <<= 1;
	n <<= 1;
	vector<cd> v1(n), v2(n);
	vector<cd> r1(n), r2(n);
	for(int i=0; i<v.size(); i++){
		v1[i] = cd(v[i] >> 15, v[i] & 32767);
	}
	for(int i=0; i<w.size(); i++){
		v2[i] = cd(w[i] >> 15, w[i] & 32767);
	}
	fft(v1, 0);
	fft(v2, 0);
	for(int i=0; i<n; i++){
		int j = (i ? (n - i) : i);
		cd ans1 = (v1[i] + conj(v1[j])) * cd(0.5, 0);
		cd ans2 = (v1[i] - conj(v1[j])) * cd(0, -0.5);
		cd ans3 = (v2[i] + conj(v2[j])) * cd(0.5, 0);
		cd ans4 = (v2[i] - conj(v2[j])) * cd(0, -0.5);
		r1[i] = (ans1 * ans3) + (ans1 * ans4) * cd(0, 1);
		r2[i] = (ans2 * ans3) + (ans2 * ans4) * cd(0, 1);
	}
	fft(r1, 1);
	fft(r2, 1);
	vector<ll> ret(n);
	for(int i=0; i<n; i++){
		ll av = (ll)round(r1[i].real());
		ll bv = (ll)round(r1[i].imag()) + (ll)round(r2[i].real());
		ll cv = (ll)round(r2[i].imag());
		av %= mod, bv %= mod, cv %= mod;
		ret[i] = (av << 30) + (bv << 15) + cv;
		ret[i] %= mod;
		ret[i] += mod;
		ret[i] %= mod;
	}
	while (ret.back() == 0) ret.pop_back();
	return ret;
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	vector<int> sabersCuantity(m);
	int aux;
	forft(s,0,n)
	{
		cin >> aux;
		aux--;
		sabersCuantity[aux]++;
	}

	random_shuffle(sabersCuantity.begin(), sabersCuantity.end());
	// sort(sabersCuantity.begin(), sabersCuantity.end());

	vector<ll> acum(1,1);
	for(auto _cuantity : sabersCuantity)
	{
		if (0 == _cuantity)
			continue;

		vector<ll> saberColorPol(min(_cuantity+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		acum = DOIT(saberColorPol, acum, 1009);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<float>;

const ll MOD = pow(10,3)+9;
const float FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		float ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
void multiply(vector<T> const &izq, vector<T> &acum, int limit_prod)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fAcum(acum.begin(), acum.end());
	int n = izq.size() + acum.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fAcum.resize(pot_2);

	fft(fIzq);
	fft(fAcum);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fAcum[i];
	}

	fft(fIzq, true);

	acum.resize(min(n, limit_prod));
	fort(i, acum.size())
	{
		acum[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		acum[i] = ((acum[i] % MOD) + MOD ) % MOD;
	}
}

vector<ll> DOIT(vector<ll> &v, vector<ll> &w, ll mod){
	int n = 1;
	while(n < max(v.size(), w.size())) n <<= 1;
	n <<= 1;
	vector<cd> v1(n), v2(n);
	vector<cd> r1(n), r2(n);
	for(int i=0; i<v.size(); i++){
		v1[i] = cd(v[i] >> 15, v[i] & 32767);
	}
	for(int i=0; i<w.size(); i++){
		v2[i] = cd(w[i] >> 15, w[i] & 32767);
	}
	fft(v1, 0);
	fft(v2, 0);
	for(int i=0; i<n; i++){
		int j = (i ? (n - i) : i);
		cd ans1 = (v1[i] + conj(v1[j])) * cd(0.5, 0);
		cd ans2 = (v1[i] - conj(v1[j])) * cd(0, -0.5);
		cd ans3 = (v2[i] + conj(v2[j])) * cd(0.5, 0);
		cd ans4 = (v2[i] - conj(v2[j])) * cd(0, -0.5);
		r1[i] = (ans1 * ans3) + (ans1 * ans4) * cd(0, 1);
		r2[i] = (ans2 * ans3) + (ans2 * ans4) * cd(0, 1);
	}
	fft(r1, 1);
	fft(r2, 1);
	vector<ll> ret(n);
	for(int i=0; i<n; i++){
		ll av = (ll)round(r1[i].real());
		ll bv = (ll)round(r1[i].imag()) + (ll)round(r2[i].real());
		ll cv = (ll)round(r2[i].imag());
		av %= mod, bv %= mod, cv %= mod;
		ret[i] = (av << 30) + (bv << 15) + cv;
		ret[i] %= mod;
		ret[i] += mod;
		ret[i] %= mod;
	}
	while (ret.back() == 0) ret.pop_back();
	return ret;
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	forft(s,0,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<ll> acum(1,1);
	for(auto kv : sabersCuantity)
	{
		vector<ll> saberColorPol(min(kv.second+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		acum = DOIT(saberColorPol, acum, 1009);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// multiply_aux y fft son los importante
// multiply de una D&C para mantener los polinomios chiquitos (OJO)
// si hay timeout se puede:
//      - cambiar long double por double
//      - sacar el pop.back() de multipy_aux

// El ejemplo es despues de multiplicar muchos polinomios con coeficientes 1. Devolver el coeficiente de un exponente.
#include <bits/stdc++.h>
using namespace std;

#define forn(i,d,h) for(int i = (int)d; i < (int)h; i++)
#define val_mod(val,mod) ((val%mod)+mod)%mod

using ll = long long int;
using ld = long double;
using cd = complex<ld>;

void fft(vector<cd> &a, bool inv=false){
    int n = a.size(), j = 0;
    vector<cd> roots(n/2);

    forn(i,1,n){
        int bit = (n >> 1);
        while(j >= bit){
            j -= bit;
            bit >>= 1;
        }
        j += bit;
        if(i < j) swap(a[i], a[j]);
    }
    double ang = 2 * acos(-1) / n * (inv ? -1 : 1);
    forn(i,0,n/2)
        roots[i] = cd(cos(ang * i), sin(ang * i));

    for(int i=2; i<=n; i<<=1){
        int step = n / i;
        for(int j=0; j<n; j+=i){
            for(int k=0; k<i/2; k++){
                cd u = a[j+k], v = a[j+k+i/2] * roots[step * k];
                a[j+k] = u+v;
                a[j+k+i/2] = u-v;
            }
        }
    }

    if(inv) forn(i,0,a.size()) a[i] /= n;
}

template <typename T>
vector<T> multiply_aux(const vector<T> &izq, const vector<T> &der, ll mod)
{
    vector<cd> fIzq(izq.begin(), izq.end()), fDer(der.begin(), der.end());
    int n = izq.size() + der.size() -1;
    T pot_2 = 1;
    while(pot_2 < n) pot_2 <<= 1;

    fIzq.resize(pot_2);
    fDer.resize(pot_2);

    fft(fIzq);
    fft(fDer);

    forn(i,0,fIzq.size()) fIzq[i] *= fDer[i];

    fft(fIzq, true);

    vector<T> prod(n);
    forn(i,0,prod.size()) {
        prod[i] = (ll)round(fmod(fIzq[i].real(),(double)mod));
        prod[i] = val_mod(prod[i],mod);
    }

    while (prod.back() == 0) prod.pop_back();

    return prod;
}

vector<int> a;

vector<ll> multiply(int s, int e){
	if(s == e){
		vector<ll> q(a[s]+1, 1);
		return q;
	}
	vector<ll> v2 = multiply(s, (s + e)/2);
	vector<ll> v3 = multiply((s + e)/2 + 1, e);
	vector<ll> ans = multiply_aux(v2, v3, 1009L);
	return ans;
}
int main(){
	int n, m, k;
	cin >> n >> m >> k;
	a.resize(m);
	forn(i,0,n){
		int b;
		cin >> b;
		b--;
		a[b]++;
	}
	random_shuffle(a.begin(), a.end());
	vector<ll> ans = multiply(0, m-1);
	cout << (int)round(ans[k]) << endl;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<float>;

const ll MOD = pow(10,3)+9;
const float FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		float ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
void multiply(vector<T> const &izq, vector<T> &acum, int limit_prod)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fAcum(acum.begin(), acum.end());
	int n = izq.size() + acum.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fAcum.resize(pot_2);

	fft(fIzq);
	fft(fAcum);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fAcum[i];
	}

	fft(fIzq, true);

	acum.resize(min(n, limit_prod));
	fort(i, acum.size())
	{
		acum[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		acum[i] = ((acum[i] % MOD) + MOD ) % MOD;
	}
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	forft(s,0,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<ll> acum(1,1);
	for(auto kv : sabersCuantity)
	{
		vector<ll> saberColorPol(min(kv.second+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		multiply(saberColorPol, acum, k+1);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define fmod(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<ld>;

const ll MOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		ld ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
vector<T> multiply(vector<T> const &izq, vector<T> const &der)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fDer(der.begin(), der.end());
	int n = izq.size() + der.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fDer.resize(pot_2);

	fft(fIzq);
	fft(fDer);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fDer[i];
	}

	fft(fIzq, true);

	vector<T> prod(n);
	fort(i, prod.size())
	{
		prod[i] = round(fIzq[i].real());
	}

	return prod;
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	fort(s,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<ll> acum(1,1);
	for(auto kv : sabersCuantity)
	{
		vector<ll> saberColorPol(min(kv.second+1, k),1);

		acum = multiply(saberColorPol, acum);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<ld>;

const ll MOD = pow(10,3)+9;
const ld FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		ld ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
void multiply(vector<T> const &izq, vector<T> &acum, int limit_prod)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fAcum(acum.begin(), acum.end());
	int n = izq.size() + acum.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fAcum.resize(pot_2);

	fft(fIzq);
	fft(fAcum);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fAcum[i];
	}

	fft(fIzq, true);

	acum.resize(min(n, limit_prod));
	fort(i, acum.size())
	{
		acum[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		acum[i] = ((acum[i] % MOD) + MOD ) % MOD;
	}
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	fort(s,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<ll> acum(1,1);
	for(auto kv : sabersCuantity)
	{
		vector<ll> saberColorPol(min(kv.second+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		multiply(saberColorPol, acum, k+1);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<ld>;

const ll MOD = pow(10,3)+9;
const ld FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		ld ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
void multiply(vector<T> const &izq, vector<T> &acum, int limit_prod)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fAcum(acum.begin(), acum.end());
	int n = izq.size() + acum.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fAcum.resize(pot_2);

	fft(fIzq);
	fft(fAcum);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fAcum[i];
	}

	fft(fIzq, true);

	acum.resize(min(n, limit_prod));
	fort(i, acum.size())
	{
		acum[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		acum[i] = ((acum[i] % MOD) + MOD ) % MOD;
	}
}

struct Sable
{
	int color, reps;
	Sable(int color, int reps)
	: color(color)
	, reps(reps)
	{}
	inline bool operator<(const Sable &rhs)
	{
		return rhs.reps < reps;
	}
};

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	forft(s,0,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<int> cantidades;
	for(auto kv: sabersCuantity)
	{
		cantidades.push_back(kv.second);
	}
	sort(cantidades.begin(), cantidades.end());

	vector<ll> acum(1,1);
	for(int _cant : cantidades)
	{
		vector<ll> saberColorPol(min(_cant+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		multiply(saberColorPol, acum, k+1);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


// http://codeforces.com/problemset/problem/958/F3
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <complex>
#include <algorithm>
#include <string>
using namespace std;

#define forft(index, from, to) for(int index = (int)from; index < (int)to; index++)
#define fort(index,to) for(int index = 0; index < (int)to; index++)
#define modsum(_izq, _der, _mod) (((_izq + _der)%_mod) + _mod ) % _mod

using ll = long long int;
using ld = long double;
using cd = complex<float>;

const ll MOD = pow(10,3)+9;
const float FMOD = pow(10,3)+9;
const double PI = acos(-1);

const int mod = 7340033;
const int root = 5;
const int root_1 = 4404020;
const int root_pw = 1 << 20;

void fft(vector<cd> &coefs, bool invert=false)
{
	int n = coefs.size();

	for(int i = 1, j = 0; i < n; i++)
	{
		int bit = n >> 1;
		for(;j & bit; bit >>= 1)
		{
			j ^= bit;
		}
		j ^= bit;

		if (i < j)
		{
			swap(coefs[i], coefs[j]);
		}
	}

	for(int len = 2; len <= n; len <<= 1)
	{
		float ang = 2 * PI / len * (invert ? -1 : 1);
		cd wlen(cos(ang), sin(ang)); // n-th 1's root generator
		for(int i = 0; i < n; i+=len)
		{
			cd w(1);
			fort(j, len/2)
			{
				cd u = coefs[i+j];
				cd v = coefs[i+j+len/2] * w;
				coefs[i+j] = u+v;
				coefs[i+j+len/2] = u-v;
				w *= wlen;
			}
		}
	}

	if(invert)
	{
		for(cd &x : coefs)
		{
			x /= n;
		}
	}
}

template <typename T>
void multiply(vector<T> const &izq, vector<T> &acum, int limit_prod)
{
	vector<cd> fIzq(izq.begin(), izq.end()), fAcum(acum.begin(), acum.end());
	int n = izq.size() + acum.size() -1;
	T pot_2 = 1;
	while(pot_2 < n)
	{
		pot_2 <<= 1;
	}

	fIzq.resize(pot_2);
	fAcum.resize(pot_2);

	fft(fIzq);
	fft(fAcum);

	fort(i, fIzq.size())
	{
		fIzq[i] *= fAcum[i];
	}

	fft(fIzq, true);

	acum.resize(min(n, limit_prod));
	fort(i, acum.size())
	{
		acum[i] = (ll)round(fmod(fIzq[i].real(),FMOD));
		acum[i] = ((acum[i] % MOD) + MOD ) % MOD;
	}
}

vector<ll> DOIT(vector<ll> &v, vector<ll> &w, ll mod){
	int n = 1;
	while(n < max(v.size(), w.size())) n <<= 1;
	n <<= 1;
	vector<cd> v1(n), v2(n);
	vector<cd> r1(n), r2(n);
	for(int i=0; i<v.size(); i++){
		v1[i] = cd(v[i] >> 15, v[i] & 32767);
	}
	for(int i=0; i<w.size(); i++){
		v2[i] = cd(w[i] >> 15, w[i] & 32767);
	}
	fft(v1, 0);
	fft(v2, 0);
	for(int i=0; i<n; i++){
		int j = (i ? (n - i) : i);
		cd ans1 = (v1[i] + conj(v1[j])) * cd(0.5, 0);
		cd ans2 = (v1[i] - conj(v1[j])) * cd(0, -0.5);
		cd ans3 = (v2[i] + conj(v2[j])) * cd(0.5, 0);
		cd ans4 = (v2[i] - conj(v2[j])) * cd(0, -0.5);
		r1[i] = (ans1 * ans3) + (ans1 * ans4) * cd(0, 1);
		r2[i] = (ans2 * ans3) + (ans2 * ans4) * cd(0, 1);
	}
	fft(r1, 1);
	fft(r2, 1);
	vector<ll> ret(n);
	for(int i=0; i<n; i++){
		ll av = (ll)round(r1[i].real());
		ll bv = (ll)round(r1[i].imag()) + (ll)round(r2[i].real());
		ll cv = (ll)round(r2[i].imag());
		av %= mod, bv %= mod, cv %= mod;
		ret[i] = (av << 30) + (bv << 15) + cv;
		ret[i] %= mod;
		ret[i] += mod;
		ret[i] %= mod;
	}
	while (ret.back() == 0) ret.pop_back();
	return ret;
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	vector<int> sabersCuantity(m);
	int aux;
	forft(s,0,n)
	{
		cin >> aux;
		aux--;
		sabersCuantity[aux]++;
	}

	sort(sabersCuantity.begin(), sabersCuantity.end());

	vector<ll> acum(1,1);
	for(auto _cuantity : sabersCuantity)
	{
		if (0 == _cuantity)
			continue;

		vector<ll> saberColorPol(min(_cuantity+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		acum = DOIT(saberColorPol, acum, 1009);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


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

    #define rep(i, a, b) for(int i = a; i < (b); ++i)
    #define trav(a, x) for(auto& a : x)
    #define all(x) x.begin(), x.end()
    #define sz(x) (int)(x).size()
    typedef long long ll;
    typedef pair<int, int> pii;
    typedef vector<int> vi;

    int get(int s) {
        return s > 1 ? 32 - __builtin_clz(s - 1) : 0;
    }

    typedef complex<double> base;

    void fft(vector<base> &a, bool inv){
    	int n = a.size(), j = 0;
    	vector<base> roots(n/2);
    	for(int i=1; i<n; i++){
    		int bit = (n >> 1);
    		while(j >= bit){
    			j -= bit;
    			bit >>= 1;
    		}
    		j += bit;
    		if(i < j) swap(a[i], a[j]);
    	}
    	double ang = 2 * acos(-1) / n * (inv ? -1 : 1);
    	for(int i=0; i<n/2; i++){
    		roots[i] = base(cos(ang * i), sin(ang * i));
    	}

    	for(int i=2; i<=n; i<<=1){
    		int step = n / i;
    		for(int j=0; j<n; j+=i){
    			for(int k=0; k<i/2; k++){
    				base u = a[j+k], v = a[j+k+i/2] * roots[step * k];
    				a[j+k] = u+v;
    				a[j+k+i/2] = u-v;
    			}
    		}
    	}
    	if(inv) for(int i=0; i<n; i++) a[i] /= n;
    }

    vector<ll> DOIT(vector<ll> &v, vector<ll> &w, ll mod){
    	int n = 1;
    	while(n < max(v.size(), w.size())) n <<= 1;
    	n <<= 1;
    	vector<base> v1(n), v2(n);
    	vector<base> r1(n), r2(n);
    	for(int i=0; i<v.size(); i++){
    		v1[i] = base(v[i] >> 15, v[i] & 32767);
    	}
    	for(int i=0; i<w.size(); i++){
    		v2[i] = base(w[i] >> 15, w[i] & 32767);
    	}
    	fft(v1, 0);
    	fft(v2, 0);
    	for(int i=0; i<n; i++){
    		int j = (i ? (n - i) : i);
    		base ans1 = (v1[i] + conj(v1[j])) * base(0.5, 0);
    		base ans2 = (v1[i] - conj(v1[j])) * base(0, -0.5);
    		base ans3 = (v2[i] + conj(v2[j])) * base(0.5, 0);
    		base ans4 = (v2[i] - conj(v2[j])) * base(0, -0.5);
    		r1[i] = (ans1 * ans3) + (ans1 * ans4) * base(0, 1);
    		r2[i] = (ans2 * ans3) + (ans2 * ans4) * base(0, 1);
    	}
    	fft(r1, 1);
    	fft(r2, 1);
    	vector<ll> ret(n);
    	for(int i=0; i<n; i++){
    		ll av = (ll)round(r1[i].real());
    		ll bv = (ll)round(r1[i].imag()) + (ll)round(r2[i].real());
    		ll cv = (ll)round(r2[i].imag());
    		av %= mod, bv %= mod, cv %= mod;
    		ret[i] = (av << 30) + (bv << 15) + cv;
    		ret[i] %= mod;
    		ret[i] += mod;
    		ret[i] %= mod;
    	}
    	while (ret.back() == 0) ret.pop_back();
    	return ret;
    }

    vector<int> a;

    vector<ll> multiply(int s, int e){
    	if(s == e){
    		vector<ll> q(a[s]+1, 1);
    		return q;
    	}
    	vector<ll> v2 = multiply(s, (s + e)/2);
    	vector<ll> v3 = multiply((s + e)/2 + 1, e);
    	vector<ll> ans = DOIT(v2, v3, 1009);
    	return ans;
    }
    int main(){
    	int n, m, k;
    	cin >> n >> m >> k;
    	a.resize(m);
    	for(int i = 0; i < n; i++){
    		int b;
    		cin >> b;
    		b--;
    		a[b]++;
    	}
    	random_shuffle(a.begin(), a.end());
    	vector<ll> ans = multiply(0, m-1);
    	cout << (int)round(ans[k]) << endl;
    }


#include <bits/stdc++.h>
#ifdef DEMETRIO
#define deb(...) fprintf(stderr,__VA_ARGS__)
#define deb1(x) cerr << #x << " = " << x << endl
#else
#define deb(...) 0
#define deb1(x) 0
#endif
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i)
#define SZ(x) ((int)x.size())
using namespace std;
typedef long long ll;

// MOD-1 needs to be a multiple of MAXN !!
// big mod and primitive root for NTT:
#define MAXN 1000000
#define MOD 1009
#define RT 5
// struct for FFT, for NTT is simple (ll with mod operations)
struct CD {  // or typedef complex<double> CD; (but 4x slower)
	double r,i;
	CD(double r=0, double i=0):r(r),i(i){}
	double real()const{return r;}
	void operator/=(const int c){r/=c, i/=c;}
};
CD operator*(const CD& a, const CD& b){
	return CD(a.r*b.r-a.i*b.i,a.r*b.i+a.i*b.r);}
CD operator+(const CD& a, const CD& b){return CD(a.r+b.r,a.i+b.i);}
CD operator-(const CD& a, const CD& b){return CD(a.r-b.r,a.i-b.i);}
const double pi=acos(-1.0); // FFT
CD cp1[MAXN+9],cp2[MAXN+9];  // MAXN must be power of 2 !!
ll R[MAXN+9];
//CD root(int n, bool inv){ // NTT
//	ll r=pm(RT,(MOD-1)/n); // pm: modular exponentiation
//	return CD(inv?pm(r,MOD-2):r);
//}
void dft(CD* a, int n, bool inv){
	fore(i,0,n)if(R[i]<i)swap(a[R[i]],a[i]);
	for(int m=2;m<=n;m*=2){
		double z=2*pi/m*(inv?-1:1); // FFT
		CD wi=CD(cos(z),sin(z)); // FFT
		// CD wi=root(m,inv); // NTT
		for(int j=0;j<n;j+=m){
			CD w(1);
			for(int k=j,k2=j+m/2;k2<j+m;k++,k2++){
				CD u=a[k];CD v=a[k2]*w;a[k]=u+v;a[k2]=u-v;w=w*wi;
			}
		}
	}
	if(inv)fore(i,0,n)a[i]/=n; // FFT
	//if(inv){ // NTT
	//	CD z(pm(n,MOD-2)); // pm: modular exponentiation
	//	fore(i,0,n)a[i]=a[i]*z;
	//}
}
vector<ll> multiply(vector<ll>& p1, vector<ll>& p2){
	int n=p1.size()+p2.size()+1;
	int m=1,cnt=0;
	while(m<=n)m+=m,cnt++;
	fore(i,0,m){R[i]=0;fore(j,0,cnt)R[i]=(R[i]<<1)|((i>>j)&1);}
	fore(i,0,m)cp1[i]=0,cp2[i]=0;
	fore(i,0,p1.size())cp1[i]=p1[i];
	fore(i,0,p2.size())cp2[i]=p2[i];
	dft(cp1,m,false);dft(cp2,m,false);
	fore(i,0,m)cp1[i]=cp1[i]*cp2[i];
	dft(cp1,m,true);
	vector<ll> res;
	n-=2;
	fore(i,0,n)res.pb((ll)fmod(fmod(floor(cp1[i].real()+0.5), MOD) + MOD, MOD)); // change for NTT
	return res;
}

int main()
{
	int n,m,k;
	cin >> n >> m >> k;
	map<int,int> sabersCuantity;
	fore(i,0,n)
	{
		int aux;
		cin >> aux;
		sabersCuantity[aux]++;
	}

	vector<ll> acum(1,1);
	for(auto kv : sabersCuantity)
	{
		vector<ll> saberColorPol(min(kv.second+1, k+1),1);
		if (k+1 < acum.size())
		{
			acum.resize(k+1);
		}
		acum = multiply(saberColorPol, acum);
		// cout << "Color " << kv.first << " with " << min(kv.second+1, k)<<endl;
		// fort(i,saberColorPol.size()) { cout << saberColorPol[i] << " "; } cout << endl;
		// fort(i,acum.size()) { cout << acum[i] << " "; } cout << endl;
	}

	int res = 0;
	if (k < acum.size())
	{
		res = acum[k]%MOD;
	}

	cout << res << endl;

	return 0;
}


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

typedef long long int ll;
#define endl "\n"
#define pll pair<ll, ll>
#define pii pair<int, int>
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define vpii vector<pair<int, int>>
#define mems(x, y) memset(x, y, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define forn(i, s, e) for (int i = s; i < (e); ++i)
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define FILEIO                          \
    freopen("./input.txt", "r", stdin); \
    freopen("./output.txt", "w", stdout);
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define time__(d)                                                               \
    for (                                                                       \
        auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
        blockTime.second;                                                       \
        debug("%s : %lld ms\n ", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false)
const int M = 1e9 + 7;

template <class T>
T ABS(const T &x) { return x > 0 ? x : -x; }
ll gcd(ll n1, ll n2) { return n2 == 0 ? ABS(n1) : gcd(n2, n1 % n2); }
ll lcm(ll n1, ll n2) { return n1 == 0 && n2 == 0 ? 0 : ABS(n1 * n2) / gcd(n1, n2); }

int main()
{
    FASTIO
#ifdef LOCAL
    FILEIO
#endif
    int n, d;
    cin >> n >> d;
    int a[n], ans = 0;
    cin >> a[0];
    forn(i, 1, n)
    {
        cin >> a[i];
        if (a[i - 1] > a[i])
        {
            int inc = ceil((a[i - 1] - a[i]) / (float)d);
            ans += inc;
            a[i] = a[i - 1] + inc * d;
        }
        if (a[i] == a[i - 1])
        {
            a[i] += d;
            ++ans;
        }
    }
    cout << ans;
    return 0;
}


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

typedef long long int ll;
#define endl "\n"
#define pll pair<ll, ll>
#define pii pair<int, int>
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define vpii vector<pair<int, int>>
#define mems(x, y) memset(x, y, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define forn(i, s, e) for (int i = s; i < (e); ++i)
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define FILEIO                          \
    freopen("./input.txt", "r", stdin); \
    freopen("./output.txt", "w", stdout);
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define time__(d)                                                               \
    for (                                                                       \
        auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
        blockTime.second;                                                       \
        debug("%s : %lld ms\n ", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false)
const int M = 1e9 + 7;

template <class T>
T ABS(const T &x) { return x > 0 ? x : -x; }
ll gcd(ll n1, ll n2) { return n2 == 0 ? ABS(n1) : gcd(n2, n1 % n2); }
ll lcm(ll n1, ll n2) { return n1 == 0 && n2 == 0 ? 0 : ABS(n1 * n2) / gcd(n1, n2); }

int main()
{
    FASTIO
#ifdef LOCAL
    FILEIO
#endif
    int n, d;
    cin >> n >> d;
    int a[n], ans = 0;
    cin >> a[0];
    forn(i, 1, n)
    {
        cin >> a[i];
        if (a[i - 1] > a[i])
        {
            int inc = ceil((a[i - 1] - a[i]) / (float)d);
            ans += inc;
            a[i] = a[i] + inc * d;
        }
        if (a[i] == a[i - 1])
        {
            a[i] += d;
            ++ans;
        }
    }
    cout << ans;
    return 0;
}


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

typedef long long int ll;
#define endl "\n"
#define pll pair<ll, ll>
#define pii pair<int, int>
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define vpii vector<pair<int, int>>
#define mems(x, y) memset(x, y, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define forn(i, s, e) for (int i = s; i < (e); ++i)
#define FASTIO                        \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define FILEIO                          \
    freopen("./input.txt", "r", stdin); \
    freopen("./output.txt", "w", stdout);
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define time__(d)                                                               \
    for (                                                                       \
        auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
        blockTime.second;                                                       \
        debug("%s : %lld ms\n ", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false)
const int M = 1e9 + 7;

template <class T>
T ABS(const T &x) { return x > 0 ? x : -x; }
ll gcd(ll n1, ll n2) { return n2 == 0 ? ABS(n1) : gcd(n2, n1 % n2); }
ll lcm(ll n1, ll n2) { return n1 == 0 && n2 == 0 ? 0 : ABS(n1 * n2) / gcd(n1, n2); }

int main()
{
    FASTIO
#ifdef LOCAL
    FILEIO
#endif
    int n, d;
    cin >> n >> d;
    int a[n];
    ll ans = 0;
    cin >> a[0];
    forn(i, 1, n)
    {
        cin >> a[i];
        if (a[i - 1] > a[i])
        {
            ll inc = ceil((a[i - 1] - a[i]) / (float)d);
            ans += inc;
            a[i] = a[i] + inc * d;
        }
        if (a[i] == a[i - 1])
        {
            a[i] += d;
            ++ans;
        }
    }
    cout << ans;
    return 0;
}


#include<bits/stdc++.h>
#define int long long int
#define TRY_HARD ios_base::sync_with_stdio(false);  cin.tie(NULL);  cout.tie(NULL);
using namespace std;

bool isPrime(int n)
{
    // Corner case
    if (n <= 1)
        return false;

    // Check from 2 to n-1
    for (int i = 2; i < n; i++)
        if (n % i == 0)
            return false;

    return true;
}

signed main()
 {
	TRY_HARD ;
	int t , d ;
	cin >> t >> d ;
	int a[t] ;
	for ( int i  = 0 ; i < t ; i++ )
	{
		cin >> a[i] ;
	}
	int ans = 0 ;
	for ( int i = 1 ; i < t ; i++ )
	{
		if ( ( a[i] - a[i-1] ) >= 1 )
		continue ;
		 else
		 {
		 	int k = a[i-1] - a[i] ;
		 	k = k + 1 ;
		 	int rem = k % d ;
		 	int q = k / d ;
		 	ans = ans + rem + q ;
		 	a[i] = a[i] + ( ( rem + q ) * d ) ;

		 }
	}
	cout << ans ;
}


#include<bits/stdc++.h>
#define int long long int
#define TRY_HARD ios_base::sync_with_stdio(false);  cin.tie(NULL);  cout.tie(NULL);
using namespace std;

bool isPrime(int n)
{
    // Corner case
    if (n <= 1)
        return false;

    // Check from 2 to n-1
    for (int i = 2; i < n; i++)
        if (n % i == 0)
            return false;

    return true;
}

signed main()
 {
	TRY_HARD ;
	int t , d ;
	cin >> t >> d ;
	int a[t] ;
	for ( int i  = 0 ; i < t ; i++ )
	{
		cin >> a[i] ;
	}
	int ans = 0 ;
	for ( int i = 1 ; i < t ; i++ )
	{
		if ( ( a[i] - a[i-1] ) >= 1 )
		continue ;
		 else
		 {
		 	int k = a[i-1] - a[i] ;
		 	k = k + 1 ;
		 	int total ;
		 	int x = (k/d)+(k%d) ;
		 	if (k%d != 0 )
		 	total = (k/d) + 1 ;
		 	else
		 	total = (k/d) ;

		 	a[i] = a[i] + ( ( total ) * d ) ;
		 	ans = ans + total ;

		 }
	}
	cout << ans ;
}


#include<bits/stdc++.h>
#define int long long int
#define TRY_HARD ios_base::sync_with_stdio(false);  cin.tie(NULL);  cout.tie(NULL);
using namespace std;

bool isPrime(int n)
{
    // Corner case
    if (n <= 1)
        return false;

    // Check from 2 to n-1
    for (int i = 2; i < n; i++)
        if (n % i == 0)
            return false;

    return true;
}

signed main()
 {
	TRY_HARD ;
	int t , d ;
	cin >> t >> d ;
	int a[t] ;
	for ( int i  = 0 ; i < t ; i++ )
	{
		cin >> a[i] ;
	}
	int ans = 0 ;
	for ( int i = 1 ; i < t ; i++ )
	{
		if ( ( a[i] - a[i-1] ) >= 1 )
		continue ;
		 else
		 {
		 	int k = a[i-1] - a[i] ;
		 	k = k + 1 ;

		 	int x = (k/d)+(k%d) ;

		 	a[i] = a[i] + ( ( x) * d ) ;
		 	ans = ans + x ;

		 }
	}
	cout << ans ;
}


#include<bits/stdc++.h>
#define int long long int
#define TRY_HARD ios_base::sync_with_stdio(false);  cin.tie(NULL);  cout.tie(NULL);
using namespace std;

bool isPrime(int n)
{
    // Corner case
    if (n <= 1)
        return false;

    // Check from 2 to n-1
    for (int i = 2; i < n; i++)
        if (n % i == 0)
            return false;

    return true;
}

signed main()
 {
	TRY_HARD ;
	int t , d ;
	cin >> t >> d ;
	int a[t] ;
	for ( int i  = 0 ; i < t ; i++ )
	{
		cin >> a[i] ;
	}
	int ans = 0 ;
	for ( int i = 1 ; i < t ; i++ )
	{
		if ( ( a[i] - a[i-1] ) >= 1 )
		continue ;
		 else
		 {
		 	int k = a[i-1] - a[i] ;
		 	int x = 1 ;
		 	while ( x * d <= k )
		 	{
		 		x++ ;
		 	}
		 	a[i] = a[i] + (x*d) ;
		 	ans = ans + x ;
		 }
	}
	cout << ans ;
}


#include<bits/stdc++.h>
#define int long long int
#define TRY_HARD ios_base::sync_with_stdio(false);  cin.tie(NULL);  cout.tie(NULL);
using namespace std;

bool isPrime(int n)
{
    // Corner case
    if (n <= 1)
        return false;

    // Check from 2 to n-1
    for (int i = 2; i < n; i++)
        if (n % i == 0)
            return false;

    return true;
}

signed main()
 {
	TRY_HARD ;
	int t , d ;
	cin >> t >> d ;
	int a[t] ;
	for ( int i  = 0 ; i < t ; i++ )
	{
		cin >> a[i] ;
	}
	int ans = 0 ;
	for ( int i = 1 ; i < t ; i++ )
	{
		if ( ( a[i] - a[i-1] ) >= 1 )
		continue ;
		 else
		 {
		 	int k = a[i-1] - a[i] ;
		 	k = k + 1 ;
		 	int total ;
		 	int x = (k/d)+(k%d) ;
		 	if (k%d != 0 )
		 	total = (k/d) + 1 ;
		 	else
		 	total = (k/d) ;

		 	a[i] = a[i] + ( ( x) * d ) ;
		 	ans = ans + total ;

		 }
	}
	cout << ans ;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<int> a(n);
  for (auto &x : a)
    cin >> x;
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] >= a[i + 1]) {
      ans += a[i] / a[i + 1];
      a[i + 1] += d * a[i] / a[i + 1];
    }
  }
  cout << ans << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

bool check(vector<int> a) {
  int ret = 0;
  for (int i = 1; i < a.size(); i++) {
    if (a[i] > a[i - 1]) {
      ret++;
    }
  }
  return ret == a.size() - 1;
}

int main() {
  int n, d;
  cin >> n >> d;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (check(a)) {
    cout << 0 << '\n';
    return 0;
  }
  int total = 0;
  for (int i = 1; i < n; i++) {
    int low = 0, high = (int) 1e9;
    int ans = 0;
    while (low <= high) {
      int mid = low + (high - low) / 2;
      if (mid * d + a[i] > a[i - 1]) {
        ans = mid;
        high = mid - 1;
      } else {
        low = mid + 1;
      }
    }
    a[i] = a[i] + ans * d;
    total += ans;
  }
  cout << total << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int total = 0;
  for (int i = 1; i < n; i++) {
    int low = 0, high = (int) 1e9;
    int ans = 0;
    while (low <= high) {
      int mid = low + (high - low) / 2;
      if (mid * d + a[i] > a[i - 1]) {
        ans = mid;
        high = mid - 1;
      } else {
        low = mid + 1;
      }
    }
    a[i] = a[i] + ans * d;
    total += ans;
  }
  cout << total << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long total = 0;
  for (int i = 1; i < n; i++) {
    int low = 0, high = (int) 1e9;
    int ans = 0;
    while (low <= high) {
      int mid = low + (high - low) / 2;
      if (mid * d * 1LL + a[i] > a[i - 1]) {
        ans = mid;
        high = mid - 1;
      } else {
        low = mid + 1;
      }
    }
    a[i] = a[i] + ans * d * 1LL;
    total += ans;
  }
  cout << total << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<int> a(n);
  for (auto &x : a)
    cin >> x;
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    while (a[i] >= a[i + 1]) {
      a[i + 1] += d;
      ans++;
    }
  }
  cout << ans << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long total = 0;
  for (int i = 1; i < n; i++) {
    int low = 0, high = (int) 1e9;
    long long ans = 0;
    while (low <= high) {
      long long mid = low + (high - low) / 2;
      if (mid * d * 1LL + a[i] > a[i - 1]) {
        ans = mid;
        high = mid - 1;
      } else {
        low = mid + 1;
      }
    }
    a[i] = a[i] + ans * d * 1LL;
    total += ans;
  }
  cout << total << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int total = 0;
  for (int i = 1; i < n; i++) {
    int low = 0, high = (int) 1e9;
    int ans = 0;
    while (low < high) {
      int mid = low + (high - low) / 2;
      if (mid * d + a[i] > a[i - 1]) {
        ans = mid;
        high = mid - 1;
      } else {
        low = mid + 1;
      }
    }
    a[i] = a[i] + ans * d;
    total += ans;
  }
  cout << total << '\n';
  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int n, d;
  cin >> n >> d;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (check(a)) {
    cout << 0 << '\n';
    return 0;
  }
  long long total = 0;
  for (int i = 1; i < n; i++) {
    int low = 0, high = (int) 1e9;
    int ans = 0;
    while (low <= high) {
      int mid = low + (high - low) / 2;
      if (mid * d * 1LL + a[i] > a[i - 1]) {
        ans = mid;
        high = mid - 1;
      } else {
        low = mid + 1;
      }
    }
    a[i] = a[i] + ans * d * 1LL;
    total += ans;
  }
  cout << total << '\n';
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    float n,d,x,p = 0,diff,y;

    vector<float> v;
    cin>>n>>d;
    for(int i = 0; i < n; i++)
    {
        cin>>x;
        v.push_back(x);
    }
    for(int i = 1; i < n; i++)
    {
        if(v[i-1]>=v[i])
        {
            diff = v[i-1]-v[i]+1;
            if(diff>d)
            {
                y = diff/d;
                v[i] = v[i]+d*(ceil(y));
                p = p+(ceil(y));
                i = i-1;
            }
            else
            {
                v[i] = v[i]+d;
                p++;
                i = i-1;
            }
            //cout<<v[i-1]<<" "<<v[i]<<endl;
        }
    }
    cout<<(int)p<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    double n,d,x,p = 0,diff,y;

    vector<double> v;
    cin>>n>>d;
    for(int i = 0; i < n; i++)
    {
        cin>>x;
        v.push_back(x);
    }
    for(int i = 1; i < n; i++)
    {
        if(v[i-1]>=v[i])
        {
            diff = v[i-1]-v[i]+1;
            if(diff>d)
            {
                y = ceil(diff/d);
                v[i] = v[i]+d*y;
                p = p+y;
                //i = i-1;
            }
            else
            {
                v[i] = v[i]+d;
                p++;
                //i = i-1;
            }
            //cout<<v[i-1]<<" "<<v[i]<<endl;
        }
    }
    cout<<(int)p<<endl;
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using dijkstra = priority_queue<T, vector<T>, greater<T>>;

typedef long long ll;
typedef unsigned long long ull;
#define fbo find_by_order  // k th index
#define ook order_of_key   // strictly smaller than k
#define PI acos(-1.0)
#define inf 0x3f3f3f3f
#define lead_zero(x) __builtin_clzll(x)
#define trail_zero(x) __builtin_ctzll(x)
#define total_1s(x) __builtin_popcountll(x)
#define first_1(x) __builtin_ffsll(x)
#define log2_(x) __builtin_clz(1) - __builtin_clz(x)
#define isLeap(x) ((x % 400 == 0) || (x % 100 ? x % 4 == 0 : false))
#define QUERY           \
    int test;           \
    scanf("%d", &test); \
    for (int _T = 1; _T <= test; _T++)
#define FAST ios_base::sync_with_stdio(0), cin.tie(0)
#define all(v) v.begin(), v.end()
#define reunique(v) v.resize(std::unique(all(v)) - v.begin())
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pul pair<ull, ull>
#define ff first
#define ss second
#define MERGE(v1, v2, v) merge(all(v1), all(v2), back_inserter(v))
#define MP make_pair
#define EB emplace_back
#define read freopen("input.txt", "r", stdin)
#define write freopen("output.txt", "w", stdout)
#define in_range(v, r, l) upper_bound(all(v), r) - lower_bound(all(v), l)
#define LCM(a, b) (a / __gcd(a, b)) * b;

ll rdn(int y, int m, int d) {
    /* Rata Die day one is 0001-01-01 */
    if (m < 3)
        y--, m += 12;
    return 365 * y + y / 4 - y / 100 + y / 400 + (153 * m - 457) / 5 + d - 306;
}
mt19937 R(chrono::system_clock().now().time_since_epoch().count());

/* Direction arrays */
/*int dx[] = {1,-1,0,0}, dy[] = {0,0,1,-1};                             */  // 4Direction
/*int dx[] = {1,-1,0,0,1,1,-1,-1}, dy[] = {0,0,1,-1,1,-1,1,-1};         */  // 8Direction
/* int dx[] = {1,-1,1,-1,2,2,-2,-2} , dy[] = {2,2,-2,-2,1,-1,1,-1};     */  // KnightDirection
/* int dx[] = {2,-2,1,1,-1,-1} , dy[] = {0,0,1,-1,1,-1};                */  // HexagonalDirection
/* int day[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; */

int main() {
    int n, d;
    cin >> n >> d;
    vector<ll> v(n);
    for (int i = 0; i < n; i++)
        cin >> v[i];
    int move = 0;
    ll prev = 0;
    for (int i = 0; i < n; i++) {
        if (v[i] > prev) {
            prev = v[i];
        } else {
            int need = (prev - v[i]) + 1;
            int cnt = need / d;
            if (need % d)
                cnt++;
            move += cnt;
            v[i] += cnt * d;
            prev = v[i];
        }
    }
    cout<<move<<"\n";

}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    float n,d,x,p = 0,diff,y;

    vector<float> v;
    cin>>n>>d;
    for(int i = 0; i < n; i++)
    {
        cin>>x;
        v.push_back(x);
    }
    for(int i = 1; i < n; i++)
    {
        if(v[i-1]>=v[i])
        {
            diff = v[i-1]-v[i]+1;
            if(diff>d)
            {
                y = ceil(diff/d);
                v[i] = v[i]+d*y;
                p = p+y;
                //i = i-1;
            }
            else
            {
                v[i] = v[i]+d;
                p++;
                //i = i-1;
            }
            //cout<<v[i-1]<<" "<<v[i]<<endl;
        }
    }
    cout<<(int)p<<endl;
    return 0;
}


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

int main()
{
    int n,d,i,cnt=0,yo;
    cin>>n>>d;
    vector<float> arr(n);
    for(i=0;i<n;i++)
        cin>>arr[i];
    for(i=0;i<n-1;i++)
    {
        if(arr[i+1]<=arr[i])
        {   if(arr[i+1]==arr[i])
            {
                arr[i+1]+=d;
                cnt++;
            }
            else
            {
                yo=ceil((arr[i]-arr[i+1])/d);
            arr[i+1]+=yo*d;
            cnt+=yo;}
        }
    }
    cout<<cnt;
    return 0;
}


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

int main()
{
    int n,d,i,cnt=0,yo;
    cin>>n>>d;
    vector<float> arr(n);
    for(i=0;i<n;i++)
        cin>>arr[i];
    for(i=0;i<n-1;i++)
    {
        if(arr[i+1]<=arr[i])
        {   if(arr[i+1]<arr[i])
            {
                yo=ceil((arr[i]-arr[i+1])/d);
            arr[i+1]+=yo*d;
            cnt+=yo;}
             if(arr[i+1]==arr[i])
            {
                arr[i+1]+=d;
                cnt++;
            }
        }
    }
    cout<<cnt;
    return 0;
}


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

int main()
{
    long long int n,d,i,cnt=0,yo;
    cin>>n>>d;
    vector<long double> arr(n);
    for(i=0;i<n;i++)
        cin>>arr[i];
    for(i=0;i<n-1;i++)
    {
        if(arr[i+1]<=arr[i])
        {   if(arr[i+1]<arr[i])
            {
                yo=ceil((arr[i]-arr[i+1])/d);
            arr[i+1]+=yo*d;
            cnt+=yo;}
             if(arr[i+1]==arr[i])
            {
                arr[i+1]+=d;
                cnt++;
            }
        }
    }
    cout<<cnt;
    return 0;
}


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

int main()
{
    int n,d,i,cnt=0,yo;
    cin>>n>>d;
    vector<float> arr(n);
    for(i=0;i<n;i++)
        cin>>arr[i];
    for(i=0;i<n-1;i++)
    {
        if(arr[i+1]<=arr[i])
        {   if(arr[i+1]==arr[i])
            {
                arr[i+1]+=d;
                cnt++;
            }
            else
            {
                yo=ceil((arr[i]-arr[i+1])/2);
            arr[i+1]+=yo*2;
            cnt+=yo;}
        }
    }
    cout<<cnt;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;cin>>n>>k;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int c=0;
for(int i=0;i<n-1;i++)
{
	if(a[i]<a[i+1])
	continue;
	else
	{
		int d=(a[i]-a[i+1])/k+1;
		c+=d;
		while(d--)
		a[i+1]+=k;
	}
}
cout<<c;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;cin>>n>>k;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int c=0;
for(int i=0;i<n-1;i++)
{
	if(a[i]<a[i+1])
	continue;
	else
	{
		int d=a[i]/k;
		if(d==0)d=a[i]%=k;
		c+=d;
		while(d--)
		a[i+1]+=k;
	}
}
cout<<c;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;cin>>n>>k;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int c=0;
for(int i=0;i<n-1;i++)
{
	if(a[i]<a[i+1])
	continue;
	else
	{
		int d=(a[i]-a[i+1])/k+1;
		if(d==0)d=a[i]%=k;
		cout<<c;
		while(d--)
		a[i+1]+=k;
	}
}
cout<<c;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;cin>>n>>k;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
int c=0;
for(int i=0;i<n-1;i++)
{
	if(a[i]<a[i+1])
	continue;
	else
	{
		int d=a[i]/k;
		c+=d;
		while(d--)
		a[i+1]+=k;
	}
}
cout<<c;
return 0;
}


#include<iostream>
#include<cstring>
using namespace std;
int main()
{
   long long int n,d;
   cin>>n>>d;
   long long int a[n],ans=0;
   for(int i=0;i<n;i++)
   {
       cin>>a[i];
       if(i!=0)
       {
           if(a[i]<=a[i-1])
           {
               a[i]+=((a[i]-a[i-1])/d+1)*d;
               ans+=(a[i]-a[i-1])/d+1;
           }
       }
   }
   cout<<ans;
    return 0;
}


#include<iostream>
#include<cstring>
using namespace std;
int main()
{
   long long int n,d;
   cin>>n>>d;
   long long int a[n],ans=0;
   for(int i=0;i<n;i++)
   {
       cin>>a[i];

       if(i!=0)
       {
           if(a[i]<=a[i-1])
           {
               ans+=((a[i-1]-a[i])/d)+1;
               a[i]+=(((a[i-1]-a[i])/d)+1)*d;

           }
       }

   }

cout<<ans;
    return 0;
}


#include<iostream>
#include<cstring>
using namespace std;
int main()
{
   long long int n,d;
   cin>>n>>d;
   long long int a[n],ans=0;
   for(int i=0;i<n;i++)
   {
       cin>>a[i];
       if(i!=0)
       {
           while(a[i]<=a[i-1])
           {
               a[i]+=d;
               ans++;
           }
       }
   }
   cout<<ans;
    return 0;
}


#include<iostream>
#include<cstring>
using namespace std;
int main()
{
   long long int n,d;
   cin>>n>>d;
   long long int a[n],ans=0;
   for(int i=0;i<n;i++)
   {
       cin>>a[i];
       if(i!=0)
       {
           if(a[i]>=a[i-1])
           {
               a[i]+=((a[i]-a[i-1])/d+1)*d;
               ans+=(a[i]-a[i-1])/d+1;
           }
       }
   }
   cout<<ans;
    return 0;
}


# include <bits/stdc++.h>

using namespace std;

int main()
{
	int n, d, moves=0;
	cin>>n>>d;

	int a[n+5];

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

	for(int i=0; i<n; i++)
	{
		while(a[i] >= a[i+1])
		{
			a[i+1] += d;
			moves++;
		}
	}

	cout<<moves<<endl;
	return 0;
}


# include <bits/stdc++.h>

using namespace std;

int main()
{
	int n, d, moves=0, diff;
	cin>>n>>d;

	int a[n+5];

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

	for(int i=0; i<n-1; i++)
	{
		if(a[i] >= a[i+1])
		{
			diff = a[i] - a[i+1];
			diff /= d;
			moves += ++diff;
			a[i+1] += d*(diff);
		}
	}

	cout<<moves<<endl;
	return 0;
}


# include <bits/stdc++.h>

using namespace std;

int main()
{
	int n, d, moves=0, diff;
	cin>>n>>d;

	int a[n+5];

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

	for(int i=0; i<n-1; i++)
	{
		if(a[i] >= a[i+1])
		{
			diff = a[i] - a[i+1];
			diff /= d;
			moves += diff + 1;
			a[i+1] += d*moves;
		}
	}

	cout<<moves<<endl;
	return 0;
}


# include <bits/stdc++.h>

using namespace std;

int main()
{
	int n, d, moves=0;
	cin>>n>>d;

	int a[n+5];

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

	for(int i=0; i<n-1; i++)
	{
		while(a[i] >= a[i+1])
		{
			a[i+1] += d;
			moves++;
		}
	}

	cout<<moves<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,a,i,j,d,p=0;
    vector<long long>v;
    cin>>n>>d;
    for(i=0; i<n; i++)
    {
        cin>>a;
        v.push_back(a);
    }

    for(i=0; i<n-1; i++)
    {
        if(v[i]>=v[i+1])
        {
            double x = v[i] - v[i+1];
            if(x!=0)
            {
                long long  y = round(x/d);
                v[i+1]=v[i+1]+y*d;
                p=p+y;
            }
            else
            {
                v[i+1]=v[i+1]+d;
                p++;
            }

        }
    }
    cout<<p<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,a,i,j,d,p=0;
    vector<long long>v;
    cin>>n>>d;
    for(i=0; i<n; i++)
    {
        cin>>a;
        v.push_back(a);
    }

    for(i=0; i<n-1; i++)
    {
        if(v[i]>=v[i+1])
        {
            double x = v[i] - v[i+1];
            if(x!=0)
            {
                long long  y = ceil(x/d);
                v[i+1]=v[i+1]+y*d;
                p=p+y;
            }
            else
            {
                v[i+1]=v[i+1]+d;
                p++;
            }

        }
    }
    cout<<p<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,a,i,j,d,p=0;
    vector<long long>v;
    cin>>n>>d;
    for(i=0; i<n; i++)
    {
        cin>>a;
        v.push_back(a);
    }

    for(i=0; i<n-1; i++)
    {
        if(v[i]>=v[i+1])
        {
            double x = v[i] - v[i+1];
            if(x!=0)
            {
                long long  y = round(x/d);
                v[i+1]=y*d;
                p=p+y;
            }
            else
            {
                v[i+1]=v[i+1]+d;
                p++;
            }
            i=i-1;
        }
    }
    cout<<p<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,a,i,j,d,p=0;
    vector<long long>v;
    cin>>n>>d;
    for(i=0; i<n; i++)
    {
        cin>>a;
        v.push_back(a);
    }

    for(i=0; i<n-1; i++)
    {
        if(v[i]>=v[i+1])
        {
            double x = v[i] - v[i+1];
            if(x!=0)
            {
                long long  y = round(x/d);
                v[i+1]=y*d;
                p=p+y;
            }
            else
            {
                v[i+1]=v[i+1]+d;
                p++;
            }
        }
    }
    cout<<p<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long int n,a,i,j,d,p=0;
    vector<long int>v;
    cin>>n>>d;
    for(i=0; i<n; i++)
    {
        cin>>a;
        v.push_back(a);
    }

        for(i=0; i<n-1; i++)
        {
            if(v[i]>=v[i+1])
            {
                v[i+1]=v[i+1]+d;
                p++;
                i=i-1;
            }
        }
    cout<<p<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n,a,i,j,d,p=0;
    vector<long long>v;
    cin>>n>>d;
    for(i=0; i<n; i++)
    {
        cin>>a;
        v.push_back(a);
    }

    for(i=0; i<n-1; i++)
    {
        if(v[i]>=v[i+1])
        {
            double x = v[i] - v[i+1];
            if(x!=0)
            {
                long long  y = ceil(x/d);
                v[i+1]=v[i+1]+y*d;
                p=p+y;
            }
            else
            {
                v[i+1]=v[i+1]+d;
                p++;
            }

            i--;

        }
    }
    cout<<p<<endl;
    return 0;
}


import java.io.IOException;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int d = in.nextInt();
        int last = -1;
        int moves=0;
        for (int i = 0; i < n; i++) {
            int number = in.nextInt();
            if (last > 0) {
                if(number<=last){
                    int t=(last-number)/d+1;
                    moves+=t;
                    number+=(t*d);
                }
            }
            last = number;
        }
        System.out.println(moves);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class IncreasingSequence {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int d = Integer.parseInt(st.nextToken());

        st = new StringTokenizer(br.readLine());

        int b[] = new int[n];
        for(int i=0; i<n; i++)
            b[i] = Integer.parseInt(st.nextToken());

        int count = 0;

        for (int i=1; i<n; i++){
            if(b[i]<=b[i-1])
            {
                int diff = b[i-1] - b[i];
                int inc = (diff/d)+1;
                count+=inc;
                b[i]+=d*inc;

            }

        }
        System.out.println(count);
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class IncreasingSequence {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int d = Integer.parseInt(st.nextToken());

        st = new StringTokenizer(br.readLine());

        int b[] = new int[n];
        for(int i=0; i<n; i++)
            b[i] = Integer.parseInt(st.nextToken());

        int count = 0;

        for (int i=1; i<n; i++){
            while(b[i]<=b[i-1])
            {
                count++;
                b[i]+=d;
            }
        }
        System.out.println(count);
    }
}


import java.util.Scanner;

public class A_11_Increasing_Sequence {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		int n=input.nextInt();
		int d=input.nextInt();
		int i;
		int[] num=new int[n];
		for(i=0;i<n;i++)
			num[i]=input.nextInt();
		int count=0;
		int tmp1;
		for(i=1;i<n;i++){
			if(num[i]<num[i-1]){
				tmp1=(num[i-1]-num[i])/d+1;
				num[i]+=tmp1*d;
				count+=tmp1;
			}
			else if(num[i]==num[i-1]){
				num[i]+=d;
				count++;
			}
		}
		System.out.println(count);
	}
}


import java.util.Scanner;

public class A_11_Increasing_Sequence {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		int n=input.nextInt();
		int d=input.nextInt();
		int i;
		int[] num=new int[n];
		for(i=0;i<n;i++)
			num[i]=input.nextInt();
		int count=0;
		int tmp1;
		for(i=1;i<n;i++){
			if(num[i]<num[i-1]){
				tmp1=(num[i-1]-num[i])/d;
				if((num[i-1]-num[i])/d!=0)
					tmp1++;
				num[i]+=tmp1*d;
				count+=tmp1;
			}
			else if(num[i]==num[i-1]){
				num[i]+=d;
				count++;
			}
		}

		System.out.println(count);
	}
}


import java.util.Scanner;

public class A_11_Increasing_Sequence {
	public static void main(String[] args){
		Scanner input=new Scanner(System.in);
		int n=input.nextInt();
		int d=input.nextInt();
		int i;
		int[] num=new int[n];
		for(i=0;i<n;i++)
			num[i]=input.nextInt();
		int count=0;
		int tmp1;
		for(i=1;i<n;i++){
			if(num[i]<num[i-1]){
				tmp1=(num[i-1]-num[i])/d;
				if((num[i-1]-num[i])%d!=0)
					tmp1++;
				num[i]+=tmp1*d;
				count+=tmp1;
			}
			else if(num[i]==num[i-1]){
				num[i]+=d;
				count++;
			}
		}

		System.out.println(count);
	}
}


import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by Darren on 14-10-21.
 */
public class A {
    Reader in = new Reader(System.in);
    PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        new A().run();
    }

    void run() throws IOException {
        int n = in.nextInt(), d = in.nextInt();
        int[] b = new int[n];
        for (int i = 0; i < n; i++)
            b[i] = in.nextInt();

        int moves = 0;
        for (int i = 1; i < n; i++) {
            if (b[i] <= b[i-1]) {
                int additional = (b[i-1]-b[i]) / d + 1;
                b[i] += additional * d;
                moves += additional;
            }
        }

        out.println(moves);
        out.flush();
    }

    static class Reader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        public Reader(InputStream input) {
            reader = new BufferedReader(new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }

        /** get next word */
        String nextToken() throws IOException {
            while ( ! tokenizer.hasMoreTokens() ) {
                //TODO add check for eof if necessary
                tokenizer = new StringTokenizer( reader.readLine() );
            }
            return tokenizer.nextToken();
        }

        String readLine() throws IOException {
            return reader.readLine();
        }

        int nextInt() throws IOException {
            return Integer.parseInt( nextToken() );
        }

        long nextLong() throws IOException {
            return Long.parseLong( nextToken() );
        }

        double nextDouble() throws IOException {
            return Double.parseDouble( nextToken() );
        }
    }
}


import java.util.*;

public class problem11Asequence {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int d = scan.nextInt();
        int[] array = new int[n];

        for (int i = 0; i < n; i++) {
            array[i] = scan.nextInt();
        }
        scan.close();

        int i = 0;
        int k = 0;
        while (i<n-1) {
            if (array[i]>=array[i+1]) {
                //System.out.println(k);
                k+=((array[i]-array[i+1])/d)+1;
                array[i+1] += d*(((array[i]-array[i+1])/d)+1);
            } else
                i++;
        }

        System.out.println(k);
    }
}


import java.util.*;

public class problem11Asequence {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();
        int d = scan.nextInt();
        int[] array = new int[n];

        for (int i = 0; i < n; i++) {
            array[i] = scan.nextInt();
        }
        scan.close();

        int i = 0;
        int k = 0;
        while (i<n-1) {
            if (array[i]>=array[i+1]) {
                //System.out.println(k);
                k+=((array[i]-array[i+1])/d)+1;
                array[i+1] += d*(((array[i]-array[i+1])/d)+1);
            } else
                i++;
        }

        System.out.println(k);
    }


import java.util.*;

public class problem11Asequence {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int d = scan.nextInt();
		int[] array = new int[n];

		for (int i = 0; i < n; i++) {
			array[i] = scan.nextInt();
		}
		scan.close();

		int i = 0;
		int k = 0;
		while (i<n-1) {
			if (array[i]>=array[i+1]) {
				k=k + ((array[i+1]-array[i])/d)+1;
				array[i+1] = array[i+1]+d*(((array[i+1]-array[i])/d)+1);
			} else
				i++;
		}

		System.out.println(k);
	}

}