//clear adj and visited vector declared globally after each test case
//check for long long overflow
//Mod wale question mein last mein if dalo ie. Ans<0 then ans+=mod;
//Incase of close mle change language to c++17 or c++14 
/**#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops”)**/
#include <bits/stdc++.h>  
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);cout.precision(dbl::max_digits10);
#define pb push_back
#define mod  998244353ll
#define lld long double
#define mii map<int, int>
#define pii pair<int, int>
#define ff first
#define ss second 
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)    
#define fill(a,b) memset(a, b, sizeof(a))
#define vi vector<int>
#define setbits(x) __builtin_popcountll(x)
#define print2d(dp,n,m) for(int i=0;i<=n;i++){for(int j=0;j<=m;j++)cout<<dp[i][j]<<" ";cout<<"\n";}
typedef std::numeric_limits< double > dbl;
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
//member functions :
//1. order_of_key(k) : number of elements strictly lesser than k
//2. find_by_order(k) : k-th element in the set
const long long N=200005, INF=2000000000000000000;
lld pi=3.1415926535897932;
int lcm(int a, int b)
{
    int g=__gcd(a, b);
    return a/g*b;
}
int power(int a, int b, int p)
    {
        if(a==0)
        return 0;
        int res=1;
        a%=p;
        while(b>0)
        {
            if(b&1)
            res=(res*a)%p;
            b>>=1;
            a=(a*a)%p;
        }
        return res;
    }
int dp[13][5005];
int fact[N],inv[N];
void pre()
{
    fact[0]=1;
    inv[0]=1;
    for(int i=1;i<N;i++)
    fact[i]=(i*fact[i-1])%mod;
    for(int i=1;i<N;i++)
    inv[i]=power(fact[i], mod-2, mod);
}
int nCr(int n, int r, int p) 
{ 
    if(r>n)
    return 0;
    if(n==r)
    return 1;
    if (r==0) 
    return 1; 
    return (((fact[n]*inv[r]) % p )*inv[n-r])%p;
}
int32_t main()
{
    IOS;
    pre();
    int n, m;
    cin>>n>>m;
    for(int i=0;i<=n;i+=2)
    dp[0][i]=nCr(n, i, mod);
    for(int i=1;i<13;i++)
    {
        int lim=(m/(1 << i));
        for(int j=0;j<=lim;j+=2)
        {
            int ad=(j*(1 << i)), mul=nCr(n, j, mod);
            for(int k=0;(k+ad)<=m;k++)
            {
                dp[i][k+ad]+=(dp[i-1][k]*mul)%mod;
                if(dp[i][k+ad]>=mod)
                dp[i][k+ad]-=mod;
            }
        }
    }
    cout<<dp[12][m];
}
#include "bits/stdc++.h"
//#include "atcoder/all"
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
#define endl "\n"
int main() {
	int N;
	cin >> N;
	string S;
	cin >> S;
	string s = "110";
	//べつしょりしたいね。
	if (1 == N) {
		if ('1' == S[0]) {
			long long ans = (long long)2 * 10000000000;
			cout << ans << endl;
		}
		else if ('0' == S[0]) {
			long long ans = 10000000000;
			cout << ans << endl;
		}
		else {
			cout << 0 << endl;
		}
		return 0;
	}
	if (2 == N) {
		if (('1' == S[0]) && ('1' == S[1])) {
			long long ans = 10000000000;
			cout << ans << endl;
		}
		else if (('1' == S[0]) && ('0' == S[1])) {
			long long ans = 10000000000;
			cout << ans << endl;
		}
		else if (('0' == S[0]) && ('1' == S[1])) {
			long long ans = 10000000000 - 1;
			cout << ans << endl;
		}
		else {
			cout << 0 << endl;
		}
		return 0;
	}
	if ((S[0] == '1') && (S[1] == '1') && (S[2] == '0')) {
		bool b = true;
		for (int i = 0; i < N; ++i) {
			if (S[i] != s[i % 3]) {
				b = false;
			}
		}
		if (b) {
			int num = (N + 2) / 3;
			long long ans = 10000000000 + 1 - num;
			cout << ans << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
	else if ((S[0] == '1') && (S[1] == '0') && (S[2] == '1')) {
		bool b = true;
		for (int i = 0; i < N; ++i) {
			if (S[i] != s[(1 + i) % 3]) {
				b = false;
			}
		}
		if (b) {
			int num = (N + 1 + 2) / 3;
			long long ans = 10000000000 + 1 - num;
			cout << ans << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
	else if ((S[0] == '0') && (S[1] == '1') && (S[2] == '1')) {
		bool b = true;
		for (int i = 0; i < N; ++i) {
			if (S[i] != s[(2 + i) % 3]) {
				b = false;
			}
		}
		if (b) {
			int num = (N + 2 + 2) / 3;
			long long ans = 10000000000 + 1 - num;
			cout << ans << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
	else {
		cout << 0 << endl;
	}
	return 0;
}