mod = 998244353 def fft_inplace(a, w): n = len(a) m = n t = 1 while m >= 2: mh = m >> 1 for i in range(0, n, m): for s in range(mh): j, k = i+s, i+mh+s a[j], u = a[j]+a[k], a[j]-a[k] a[k] = u * w[s*t] % mod m = mh t *= 2 def ifft_inplace(a, w): n = len(a) m = 2 t = -(n >> 1) while m <= n: mh = m >> 1 for i in range(0, n, m): for s in range(mh): j, k = i+s, i+mh+s u = a[k] * w[s*t] % mod a[j], a[k] = a[j]+u, a[j]-u m <<= 1 t //= 2 n_inv = pow(n, mod-2, mod) for i in range(n): a[i] = a[i] * n_inv % mod n, m = map(int, input().split()) fixed_n = 1 << ((n+1)*2).bit_length() w_root = pow(3, (mod-1)//fixed_n, mod) w = [1] * fixed_n for i in range(1, fixed_n): w[i] = w[i-1] * w_root % mod frac = [1] * (n + 1) for i in range(1, n+1): frac[i] = frac[i-1] * i % mod frac_inv = [0] * (n+1) frac_inv[n] = pow(frac[n], mod-2, mod) for i in range(1, n+1)[::-1]: frac_inv[i-1] = frac_inv[i] * i % mod dp1 = [0] * fixed_n dp1[0] = 1 t = [0] * fixed_n for i in range(n+1): t[i] = (pow(2, i, mod)-1) * pow(pow(2, i, mod) * frac[i], mod-2, mod) % mod fft_inplace(t, w) ans_sub = [0] * (n+1) for k in range(min(n, m+1)): fft_inplace(dp1, w) for i, j in enumerate(t): dp1[i] = dp1[i] * j % mod ifft_inplace(dp1, w) pow_tmp = 1 for i in range(k+1, n+1)[::-1]: ans_sub[i] += dp1[i] * pow_tmp % mod pow_tmp = pow_tmp * (m - k) % mod for i in range(n+1, fixed_n): dp1[i] = 0 ans = sum(ans_sub[i] % mod * frac_inv[n-i] for i in range(n+1)) % mod ans = ans * pow(2, n, mod) * frac[n] % mod print(ans)