#include<iostream>
#include<cstring>
#include<vector>
#include<cmath>
using namespace std;
typedef long long int LL;
const LL MAX=998244353;
LL comb[300005];

LL ex(LL a,LL n){
	LL i,j;
	LL s=1;
	for(i=0;(1<<i)<=n;i++){}
	i--;
	for(;i>=0;i--){
		s=(s*s)%MAX;
		if(n&(1<<i))s=(s*a)%MAX;
	}
	return s;
}

void init(LL n){
	LL s=1;
	comb[0]=s;
	for(LL i=1;i<=n;i++){
		s=(s*(n-i+1))%MAX;
		s=(s*ex(i,MAX-2))%MAX;
		comb[i]=s;
	}
}

int main(){
	LL n;
	LL s=0;
	LL i,j,k;
	LL a,b,c;
	LL x,y;
	cin>>n>>a>>b>>c;
	init(n);
	for(i=0;i<=n;i++){
		x=c-a*i;
		if(x<0)break;
		if(x%b!=0 || x/b>n)continue;
		x/=b;
		s+=comb[i]*comb[x];
		s%=MAX;
	}
	cout<<s<<endl;
	return 0;
}
