object Main extends App {

  def combination(i:Long,j:Int):Long = {
    val jj = if (j>i/2){
      (i-j).toInt
    } else {
      j
    }
    var vi = if (i==0) {
      1
    } else {
      i
    }
    var result = 1L
    (1 to jj).foreach(vj =>{
      result = result * vi / vj
      vi = vi - 1
    })
    result
  }

  val sc = new java.util.Scanner(System.in)
  val n,a,b,k = sc.nextLong()
  //ごにょごにょ式変形した結果の処理
  //x:赤個数 y:緑個数 z:青個数
  var count = 0L
  (0 to Array(k/a,n).min.toInt).foreach(x=>{
    (0 to ((b*k-a*x)/b).toInt).foreach(z=>{
      val y = ((k-a*x-b*z)/(a+b)).toInt
      if (a*x+(a+b)*y+b*z==k){
       count = (count + combination(n,x)*combination(n-x,y)*combination(n-x-y,z))%998244353L
      }
    })
  })
  println(count)
}