Problem statement

Given the integers $ N $ and $ X $. Find the remainder by dividing the number of sequences of length $ N $ that satisfy the following conditions by $ 998244353 $.

* The sequence is a monotonous increase in a broad sense.
* Each element of the sequence is greater than or equal to $ 0 $ and less than or equal to $ X $.
* The exclusive OR (xor) of all elements is $ X $.



Constraint

* $ 1 \ leq N \ leq 500 $
* $ 0 \ leq X \ leq 500 $
* $ N $ and $ X $ are integers.



* * *

input

Input is given from standard input in the following format.


$ N $ $ X $


output

Output the answer.

* * *

Input example 1


twenty three


Output example 1


2


The sequences $ \\ {0,3 \\} $ and $ \\ {1,2 \\} $ satisfy the condition.

* * *

Input example 2


1 1


Output example 2


1


Only the sequence $ \\ {1 \\} $ meets the condition.

* * *

Input example 3


224 239


Output example 3


400351036






Example

Input

2 3


Output

2
#include <iostream>
#include <vector>
using namespace std;

int main() {
  int N, X; cin >> N >> X;
  int x = X, L = 0;
  while (x > 0) {
    x >>= 1;
    L += 1;
  }
  L = 1<<L;
  vector< vector<int>> dp0(L, vector<int>(X+1, 0));
  vector< vector<int>> dp1(L, vector<int>(X+1, 0));
  int mod = 998244353;
  for (int i = 0; i <= X; i++) {
    dp0[i][i] = 1;
  }
  for (int i = 0; i < N-1; i++) {
    for (int j = 0; j < L; j++) {
      for (int k = 0; k < X; k++)
        dp0[j][k+1] = (dp0[j][k+1]+dp0[j][k])%mod;
    }
    for (int j = 0; j < L; j++) {
      for (int k = 0; k <= X; k++)
        dp1[j][k] = dp0[j^k][k];
    }
    dp0 = dp1;
  }
  long long ans = 0;
  for (int i = 0; i <= X; i++) {
    ans = (ans+dp0[X][i])%mod;
  }
  cout << ans % mod << endl;
}

