#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

//constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr long double EPS = 1e-8;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	int N, K;
	cin >> N >> K;
	vector<vector<long long int>>dp(N + 1, vector<long long int>(512));
	dp[0][0] = 1;
	for (int j = 0; j <= K; j++) {
		for (int k = 0; k < N; k++) {
			for (int l = 0; l < 512; l++) {
				dp[k + 1][l^j] += dp[k][l];
				dp[k + 1][l^j] %= MOD;
			}
		}
	}
	cout << dp.back()[K] << endl;
}
