#include <bits/stdc++.h>
int mod = 998244353, n, k;
long long ksm(int b) {
  long long a = 2, s = 1;
  while (b) {
    if (b & 1) s = s * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return s;
}
int main() {
  scanf("%d%d", &n, &k);
  k = int(sqrt(k) + 0.9999);
  printf(
      "%I64d",
      ((ksm(2 * n - 1) - ksm(2 * n - 2 * k + 1) * (n - 1)) % mod + mod) % mod);
}
