#include long long power_mod (long long a, long long b, long long mod_num) { long long ans = 1LL; if (b > 0LL) { ans = power_mod(a, b/2LL, mod_num); ans = (ans * ans) % mod_num; if (b%2LL == 1LL) { ans = (ans * (a % mod_num)) % mod_num; } } return ans; } int main () { int n = 0; long long b = 0LL; long long c = 0LL; int res = 0; long long ans = 0LL; long long mod_num = 998244353LL; long long comb[60001] = {}; long long mul = 1LL; long long div = 1LL; long long cnt[60001] = {}; long long tmp[120002] = {}; res = scanf("%d", &n); res = scanf("%lld", &b); res = scanf("%lld", &c); for (int i = 0; i <= n; i++) { comb[i] = mul*power_mod(div, mod_num-2LL, mod_num); comb[i] %= mod_num; mul *= (long long) (n-i); mul %= mod_num; div *= (long long) (i+1); div %= mod_num; } cnt[0] = 1LL; for (int i = 0; i < 60; i++) { for (int j = 0; j <= 2*n; j++) { tmp[j] = 0LL; } for (int j = 0; j <= n; j++) { if (cnt[j] > 0LL) { if ((c&(1LL<<((long long)i))) > 0LL) { for (int k = 0; 2*k+1 <= n; k++) { tmp[2*k+1+j] += cnt[j]*comb[2*k+1]; tmp[2*k+1+j] %= mod_num; } } else { for (int k = 0; 2*k <= n; k++) { tmp[2*k+j] += cnt[j]*comb[2*k]; tmp[2*k+j] %= mod_num; } } } } if ((b&(1LL<<((long long)i))) > 0LL) { for (int j = 0; j <= 2*n; j += 2) { tmp[j] = 0LL; } } else { for (int j = 1; j <= 2*n+1; j += 2) { tmp[j] = 0LL; } } for (int i = 0; i <= n; i++) { cnt[i] = (tmp[2*i]+tmp[2*i+1])%mod_num; } } ans = cnt[0]; printf("%lld\n", ans); return 0; }