from math import comb

# a + b √5

mod = 998244353

class Q_v5:
	def __init__(self, a, b):
		self.a = a % mod
		self.b = b % mod
	def __add__(self, other):
		return self.__class__((self.a + other.a) % mod, (self.b + other.b) % mod)
	def __sub__(self, other):
		return self.__class__((self.a - other.a) % mod, (self.b - other.b) % mod)
	def __mul__(self, other):
		return self.__class__((self.a * other.a + self.b * other.b * 5) % mod, (self.a * other.b + self.b * other.a) % mod)
	def __truediv__(self, other):
		other_inv = pow(other.a * other.a - 5 * other.b * other.b, mod - 2, mod)
		return self.__class__((self.a * other.a - 5 * self.b * other.b) * other_inv % mod, (other.a * self.b - self.a * other.b) * other_inv % mod)
	def __neg__(self):
		return self.__class__(-self.a % mod, -self.b % mod)
	def __str__(self):
		return str(self.a) + ' + ' + str(self.b) + ' √5'

# 繰り返し二乗法
def pow_(a: Q_v5, n: int):
	res = Q_v5(1, 0)
	now = a
	for i in range(100):
		if n & (1 << i):
			res = res * now
		now = now * now
	return res

N, K = map(int, input().split())

sm = Q_v5(0, 0)
inv2 = 499122177
a = Q_v5(inv2, inv2)
b = Q_v5(inv2, -inv2)
for i in range(K + 1):
	p = comb(K, i) * (1 if i % 2 == 0 else -1) % mod
	x = pow_(a, K - i) * pow_(b, i)
	# x^1 + ... + x^N
	if x.a == 1 and x.b == 0:
		sm = sm + Q_v5(p * N, 0)
	else:
		sm = sm + Q_v5(p, 0) * (pow_(x, N + 1) - x) / (x - Q_v5(1, 0))
sm = sm / pow_(Q_v5(0, 1), K)
print(sm.a)