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 __pow__(self, other): # self ** other.a n = other.a res = self.__class__(1, 0) now = self.__class__(self.a, self.b) # 繰り返し二乗法 for i in range(100): if n & (1 << i): res = res * now now = now * now return res def __neg__(self): return self.__class__(-self.a % mod, -self.b % mod) def __str__(self): return str(self.a) + ' + ' + str(self.b) + ' √5' N, K = map(int, input().split()) assert(N < 100) 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 = (a ** Q_v5(K - i, 0)) * (b ** Q_v5(i, 0)) # 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) * (x ** Q_v5(N + 1, 0) - x) / (x - Q_v5(1, 0)) sm = sm / (Q_v5(0, 1) ** Q_v5(K, 0)) print(sm.a)