let result = ref 0;;
let rec fact n = if n = 0 then 1 else n * fact (n - 1);;
             
let () =
  let n, a, b, k = Scanf.scanf "%d %d %d %d"
                     (fun n a b k -> n, a, b, k) in
  let rgb_color () =
    for i = 0 to n do
      let n1 = n - i in
      for j = 0 to n1 do
        let n2 = n1 - j in
        for s = 0 to n2 do
          let n3 = n2 - s in
          for t = 0 to n3 do
            if (i * a + j * (a+b) + s * b)  = k && i+j+s+t = n then
              let r = if i = 0 || i = 1 then 0 else fact i in
              let g = if  j = 0 || j = 1 then 0 else fact j in
              let b = if  s = 0 || s = 1 then 0 else fact s in
              let c = if  t = 0 || t = 1 then 0 else fact t in
            result :=
              (!result) +  (fact n / (r + g + b + c)) 
          else
            ()
          done
        done
      done
    done
  in
  let _ = rgb_color () in
  let x = (!result) mod  998244353 in
  print_endline (string_of_int x)
                                      
      
