You are given two positive integers N and K. How many multisets of rational numbers satisfy all of the following conditions?
 - The multiset has exactly N elements and the sum of them is equal to K.
 - Each element of the multiset is one of 1, \frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \dots. In other words, each element can be represented as \frac{1}{2^i}\ (i = 0,1,\dots).
The answer may be large, so print it modulo 998244353.

-----Constraints-----
 - 1 \leq K \leq N \leq 3000
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N K

-----Output-----
Print the number of multisets of rational numbers that satisfy all of the given conditions modulo 998244353.

-----Sample Input-----
4 2

-----Sample Output-----
2

The following two multisets satisfy all of the given conditions:
 - {1, \frac{1}{2}, \frac{1}{4}, \frac{1}{4}}
 - {\frac{1}{2}, \frac{1}{2}, \frac{1}{2}, \frac{1}{2}}

Difficulty: competition

Starter code:

Solutions:
n,k=map(int,input().split())
mod=998244353
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
  for j in range(i,-1,-1):
    dp[j]=dp[j-1]
    if 2*j<=i:
      dp[j]+=dp[2*j]
    dp[j]%=mod
print(dp[k])

# 解答AC
N,K = map(int, input().split())

MOD = 998244353

# dp[i][j]
# jを、i個の1,1/2,...に分解する方法は何通りあるか
# dp[i][j] = dp[i - 1][j - 1] + dp[i][2 * j]
# i < j => dp[i][j] = 0
dp = [[0] * (2 * N + 1) for _ in range(N + 1)]

dp[0][0] = 1

for i in range(1, N + 1):
  for j in range(i, 0, -1):
    dp[i][j] = (dp[i - 1][j - 1] + dp[i][2 * j]) % MOD

print(dp[N][K])

n, k = list(map(int, input().split()))
MOD = 998244353

dp = [1]
for i in range(1, n + 1):
    ndp = [0] * (i + 1)

    for j in range(i, 0, -1):
        tmp = dp[j - 1]
        if j * 2 <= i:
            tmp += ndp[j * 2]
        ndp[j] = tmp % MOD

    dp = ndp

print((dp[k]))


N, K = list(map(int, input().split()))
MOD = 998244353

# dp[i][j] := 要素数 i で、合計が j になるような集合の数
dp = [[0] * (N + 1) for _ in range(N + 1)]

for i in range(1, N + 1):
    # dp[i][N], ..., dp[i][i+1] = 0 (初期値のまま)

    # 全て1を入れる時の1通りのみ
    dp[i][i] = 1

    for j in range(i - 1, 0, -1):
        # 1を使う場合
        # j-1を、i-1個の[1, 1/2, 1/4,...]に分ける場合の数

        # 1を使わない場合 -> 全てを2倍して考える
        # 2*jを、i個の[1, 1/2, 1/4,...]に分ける場合の数
        # 2*j > i の場合、実現不可能

        if 2 * j <= i:
            dp[i][j] = dp[i - 1][j - 1] + dp[i][2 * j]
        else:
            dp[i][j] = dp[i - 1][j - 1]
        dp[i][j] %= MOD

print((dp[N][K]))


N, K = list(map(int, input().split()))
MOD = 998244353

# dp[i][j] := 要素数 i で、合計が j になるような集合の個数
dp = [[0 for _ in range(N + 1)]for _ in range(N + 1)]

for i in range(1, N + 1):
    # dp[i][N], ..., dp[i][i+1] = 0 (初期値のまま)

    # 全て1を入れる時の1通りのみ
    dp[i][i] = 1

    for j in range(i - 1, 0, -1):
        # 1を使う場合
        # j-1を、i-1個の[1, 1/2, 1/4,...]に分ける場合の数

        # 1を使わない場合 -> 全てを2倍して考える
        # 2*jを、i個の[1, 1/2, 1/4,...]に分ける場合の数
        # 2*j > i の場合、実現不可能

        if 2 * j <= i:
            dp[i][j] = dp[i - 1][j - 1] + dp[i][2 * j]
        else:
            dp[i][j] = dp[i - 1][j - 1]
        dp[i][j] %= MOD

print((dp[N][K] % MOD))


n,k = map(int,input().split())
mod = 998244353

# decompose K into N numbers using 1,1/2,1/4,...
# O(N*K)
# recursion isn't good bc implicit stack space is O(N^2), too large
# can do O(n) space by using only two rows

dp = [[0]*(n+1) for _ in range(n+1)]

for i in range(1,n+1):
    dp[i][i] = 1

for i in range(1,n+1):
    for j in range(i-1,0,-1):
        dp[i][j] = dp[i-1][j-1]
        dp[i][j] += dp[i][2*j] if 2*j <= n else 0
        dp[i][j] = dp[i][j] % mod
print(dp[n][k] % mod)

MOD = 998244353
n, k = map(int, input().split())
dp = [[0 for _ in range(n+1)] for _ in range(n+1)]
dp[1][1] = 1
for i in range(2, n+1):
	for j in range(i, 0, -1):
		dp[i][j] = dp[i-1][j-1]
		if 2*j <= i:
			dp[i][j] += dp[i][2*j]
			dp[i][j] %= MOD
print(dp[n][k])

mod = 998244353
N, K = map(int, input().split())
dp = [[0] * (N + 1) for _ in range(N + 1)]
dp[0][0] = 1
for i in range(1, N + 1):
    for j in reversed(range(N + 1)):
        dp[i][j] = dp[i - 1][j - 1] + (dp[i][2 * j] if 2 * j <= N else 0)
        dp[i][j] %= mod
print(dp[N][K])

MOD = 998244353

n, k = map(int, input().split())
dp = [[0 for _ in range(n + 1)] for _ in range(n + 1)]
dp[0][0] = 1
for i in range(1, n + 1):
    for j in range(i, 0, -1):
        dp[i][j] = dp[i - 1][j - 1]
        try:
            dp[i][j] += dp[i][j * 2]
        except IndexError:
            pass
        dp[i][j] %= MOD

print(dp[n][k])

# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


def gen_2d(n, m, fill=0):
    return [[fill] * m for _ in range(n)]


@mt
def slv(N, K):
    memo = gen_2d(N+1, 2*N+1)
    memo[0][0] = 1
    M = 998244353
    for n in range(1, N+1):
        for k in range(n, 0, -1):
            x = memo[n-1][k-1]
            x += memo[n][k*2]
            x %= M
            memo[n][k] = x
    return memo[N][K]


def main():
    N, K = read_int_n()
    print(slv(N, K))


def __starting_point():
    main()

__starting_point()

# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


def gen_2d_array(n, m, fill=0):
    if callable(fill):
        return [[fill()] * m for _ in range(n)]
    else:
        return [[fill] * m for _ in range(n)]


def gen_3d_array(n, m, k, fill=0):
    if callable(fill):
        return [[[fill()] * k for _ in range(m)] for _ in range(n)]
    else:
        return [[[fill] * k for _ in range(m)] for _ in range(n)]

@mt
def slv(N, K):
    memo = gen_2d_array(N+1, 2*N+1)
    memo[0][0] = 1
    M = 998244353
    for n in range(1, N+1):
        for k in range(n, 0, -1):
            memo[n][k] = (memo[n-1][k-1] + memo[n][k*2]) % M
    return memo[N][K]


def main():
    N, K = read_int_n()
    print(slv(N, K))


def __starting_point():
    main()

__starting_point()

# region header
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
import copy
# @lru_cache(maxsize=None)
# sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
# endregion
# region input function


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


# endregion
mod = 998244353
n, k = inpl()
dp = [[0] * (n + 1) for _ in range(n + 1)]
# i個使ってjを作れる個数
for i in range(1, n + 1):
    for j in range(1, i + 1)[::-1]:
        if i == j:
            dp[i][j] = 1
            continue
        # 1を使う(i-1個使ってj-1を作ったものに1を添える)
        a = dp[i - 1][j - 1]
        # 1を使わない(1を含めてi個使って2jを作り、全体を1/2する)
        b = dp[i][2 * j] if 2 * j < n + 1 else 0
        dp[i][j] = (a + b) % mod
print((dp[n][k] % mod))


N,K=list(map(int,input().split()))
m=998244353
dp = [[0]*(N+1) for _ in range(N+1)]
dp[0][0]=1
for n in range(1,N+1):
    for k in range(N,-1,-1):
        if 2*k<=N:
            dp[n][k]=(dp[n-1][k-1]+dp[n][2*k])%m
        else:
            dp[n][k] =(dp[n-1][k-1])%m
print((dp[N][K]))



def solve():
    MOD = 998244353

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

    N2 = N-N%2

    dp = [[0]*(N+1) for _ in range(N-K+1)]
    accRevDp = [[0]*(N+1) for _ in range(N-K+1)]
    dp[0][K] = 1
    accRevDp[0] = [1]*(K+1) + [0]*(N-K)
    for i in range(1, N-K+1):
        j = min(N2, 2*i)
        dp[i][j] = accRevDp[i][j] = accRevDp[i-j//2][j//2]
        for j in reversed(list(range(0, min(N2, 2*i), 2))):
            dp[i][j] = accRevDp[i-j//2][j//2]
            accRevDp[i][j+1] = accRevDp[i][j+2]
            accRevDp[i][j] = (accRevDp[i][j+1] + dp[i][j]) % MOD

    ans = sum(dp[N-K]) % MOD
    print(ans)


solve()


def solve():
    MOD = 998244353

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

    N2 = N-N%2

    dp = [[0]*(N+1) for _ in range(N-K+1)]
    accRevDp = [[0]*(N+1) for _ in range(N-K+1)]
    dp[0][K] = 1
    accRevDp[0] = [1]*(K+1) + [0]*(N-K)
    for i in range(1, N-K+1):
        j = min(N2, 2*i)
        dp[i][j] = accRevDp[i][j] = accRevDp[i-j//2][j//2]
        for j in reversed(list(range(0, min(N2, 2*i), 2))):
            dp[i][j] = accRevDp[i-j//2][j//2]
            accRevDp[i][j+1] = accRevDp[i][j+2]
            accRevDp[i][j] = (accRevDp[i][j+1] + dp[i][j]) % MOD

    ans = sum(dp[N-K]) % MOD
    print(ans)


solve()


n,k=map(int,input().split())
dp=[[0 for j in range(3001)] for i in range(n+1)]

for i in range(1, n+1):
  for j in range(3000, -1, -1):
    if i < j or j == 0:
      dp[i][j] = 0
    elif i == j:
      dp[i][j] = 1
    else:
      dp[i][j] = (dp[i-1][j-1] + (0 if i < j*2 else dp[i][j*2])) % 998244353

print(dp[n][k])

from itertools import combinations
P = 998244353
nn = 2002002
fa = [1] * (nn+1)
fainv = [1] * (nn+1)
for i in range(nn):
    fa[i+1] = fa[i] * (i+1) % P

dp = []
for _ in range(3001):
  dp.append([0]*3001)

for i in range(3001):
  dp[i][i] = 1

for i in range(1,3001):
  for j in reversed(range(1,i)):
    if 2*j > 3000:
      dp[i][j] = dp[i-1][j-1]
    else:
      dp[i][j] = (dp[i-1][j-1] + dp[i][2*j])%P

N,K = [int(i) for i in input().split()]
print(dp[N][K])

n, k = map(int, input().split())
mod = 998244353
dp = [[0] * 6005 for _ in range(3001)]
dp[0][0] = 1
for i in range(1, 3001):
    for j in range(i, 0, -1):
        dp[i][j] = dp[i - 1][j - 1] + dp[i][2 * j]
        dp[i][j] %= mod
ans = dp[n][k]
print(ans)

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, K = mapint()
mod = 998244353

dp = [[0]*(N*2+1) for _ in range(N+1)]
dp[0][0] = 1

for i in range(1, N+1):
    for j in range(N, 0, -1):
        # j-1 の i-1 分割に 1 を足す + 2*j の i 分割を 2 で割る
        dp[i][j] = (dp[i-1][j-1] + dp[i][2*j])%mod

print(dp[N][K]%mod)

n,k=map(int,input().split())
dp=[[0]*(2*n+1) for i in range(n+1)]
dp[0][0]=1
mod=998244353

for i in range(1,n+1):
    for j in range(i,0,-1):
        dp[i][j]=dp[i-1][j-1]+dp[i][2*j]
        dp[i][j]%=mod


print(dp[n][k])

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

mat=[[0 for i in range(j+1)]for j in range(N+1)]

def tar(Num,Sum):

  if Num < Sum:

    return 0

  return mat[Num][Sum]

mat[1][1]=1

MOD = 998244353

for i in range(2,N+1):

  for j in range(1,i+1)[::-1]:

    mat[i][j]=tar(i-1,j-1)+tar(i,2*j)

    mat[i][j]%=MOD

(print(mat[N][K]))

mod = 998244353
N, K = map(int, input().split())
dp = [[0] * (N + 1) for _ in range(N + 1)]
dp[0][0] = 1
for i in range(1, N + 1):
    for j in reversed(range(N + 1)):
        dp[i][j] = dp[i - 1][j - 1] + (dp[i][2 * j] if 2 * j <= N else 0)
        dp[i][j] %= mod
print(dp[N][K])

mod = 998244353
N, K = map(int, input().split())
dp = [[0]*(N+1) for _ in range(N+1)]
dp[0][0] = 1
for i in range(1,N+1):
  for j in range(1,N+1):
    k = j - 1
    while k <= i:
      dp[i][j] += dp[i - 1][k]
      dp[i][j] %= mod
      k = k * 2 + 1
ans = dp[N][K]%mod
print(ans)

MOD = 998244353


def f(N, K):
    if K > N:
        return 0
    
    S0 = [1]
    for i in range(1, N+1):
        S1 = [0]*(i+1)
        for j in range(i, 0, -1):
            S1[j] = (S0[j-1] + (S1[j*2] if j*2<=i else 0))%MOD
        S0 = S1
    
    return S0[K]
        
N, K = list(map(int, input().split()))
print((f(N,K)))


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

mat=[[0 for i in range(j+1)]for j in range(N+1)]

def tar(Num,Sum):

  if Num < Sum:

    return 0

  return mat[Num][Sum]

mat[1][1]=1

MOD = 998244353

for i in range(1,N+1):

  for j in range(1,i+1)[::-1]:
    if i*j==1:continue
    mat[i][j]=tar(i-1,j-1)+tar(i,2*j)

    mat[i][j]%=MOD

(print(mat[N][K]))

import sys
import math
import itertools
from collections import defaultdict, deque, Counter
from copy import deepcopy
from bisect import bisect, bisect_right, bisect_left
from heapq import heapify, heappop, heappush
from operator import itemgetter, attrgetter
from itertools import permutations, combinations
sys.setrecursionlimit(500000)

n, K = map(int, input().split())
mo = 998244353
a = [[0] * (n + 2) for _ in range(n + 2)]
a[0][0] = 1
for i in range(1, n + 1):
    for j in range(n, 0, -1):
        a[i][j] = a[i - 1][j - 1] + (a[i][j * 2] if j * 2 <= n else 0)
        a[i][j] %= mo
print(a[n][K] % mo)

# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


def gen_2d(n, m, fill=0):
    return [[fill] * m for _ in range(n)]


@mt
def slv(N, K):
    memo = gen_2d(N+1, 2*N+1)
    memo[0][0] = 1
    M = 998244353
    for n in range(1, N+1):
        for k in range(n, 0, -1):
            memo[n][k] = (memo[n-1][k-1] + memo[n][k*2]) % M
    return memo[N][K]


def main():
    N, K = read_int_n()
    print(slv(N, K))


def __starting_point():
    main()

__starting_point()

N, K = map(int, input().split())
mod = 998244353
dp = [[0 for _ in range(N+1)] for _ in range(N+1)]
dp[0][0] = 1
for i in range(1, N+1):
    for j in reversed(range(N+1)):
        dp[i][j] = dp[i-1][j-1] 
        if 2*j <= N:
            dp[i][j] += dp[i][2*j]
        dp[i][j] %= mod

print(dp[N][K])

def solve():
    MOD = 998244353

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

    dp = [[0]*(N+1) for _ in range(N+1)]
    dp[0][0] = 1
    for num in range(1, N+1):
        for sm in reversed(list(range(N+1))):
            if num > 0 and sm > 0:
                dp[num][sm] += dp[num-1][sm-1]
            if 2*sm <= N:
                dp[num][sm] += dp[num][2*sm]
            dp[num][sm] %= MOD

    ans = dp[N][K]
    print(ans)


solve()


def MI():
    return list(map(int, input().split()))

n,k= MI()
mod=998244353
if n<k:
    print((0))
    return

dp=[[0]*(2*n+1) for i in range(n+1)]
dp[0][0]=1
for i in range(1,n+1):
    for j in range(i,0,-1):
        dp[i][j]+=dp[i][j*2]+dp[i-1][j-1]
        dp[i][j]%=mod

print((dp[n][k]))


N, K= map(int, input().split())
dp = [[0]*(N+2) for i in range(N+1)]

for i in range(1, N+1):
    dp[i][i] = 1
    for j in range(i-1, 0, -1):
        dp[i][j] = (dp[i-1][j-1] + dp[i][min(2*j, N+1)])%998244353

print(dp[N][K])

MOD=998244353
INF=float('inf')

N,K=map(int,input().split())
dp=[[0]*(N+1) for _ in range(N+1)]
dp[0][0]=1

for i in range(1,N+1):
    for j in reversed(range(1,N+1)):
        dp[i][j]=dp[i-1][j-1]
        if j*2<=N:
            dp[i][j]=(dp[i][j]+dp[i][2*j])%MOD
print(dp[N][K])

import sys
input = sys.stdin.readline

sys.setrecursionlimit(10000)

def I(): return int(input())
def MI(): return list(map(int, input().split()))
def LI(): return list(map(int, input().split()))
mod=998244353

"""
K個の1を用意して，これらを適当な個数に分割していくことを考える．
合計でN個に分けたいので,これは玉を区別しない,箱を区別しない,各箱に最低1つ,
の条件ぽいので分割数ぽい.

ただし,1を4個に分ける時に2パターンあったりする.
n=?,K=1の時にいい感じの値を返すようにしたい.

他にも，使う1の個数で場合分けというのもある．
1をa個使うと，1以外のN-a個の数でK-aを作るということになり，これは値を2倍すればN-a個で2(K-a)を作るのと同値

本番中は頭がバグっていたが，5個で1を作る時も3パターンあるね
j=1の時だけ別個で求めようか．


あー,dpテーブルを埋める時，i=jの時にdp[i][j]が1なんだから，jの降順に埋めてけばいいんじゃんか...
斜め(桂馬っぽい動き)の累積和を持てば良さげ，だけど，この累積和の途中部分をどこかで利用しているのでそのマスをうまく使えば良い.

dp[i][j]=dp[i][2j]+dp[i-1][j-1]
"""


N,K=MI()
if N==K:
    print((1))
    return

if K>N:
    print((0))
    return
    
M=max(N,K)
dp=[[0]*(M+1) for _ in range(N+1)]
# dp[i][j]はi個でjを作る

for i in range(1,M+1):
    dp[i][i]=1

for i in range(1,N+1):
    for j in range(i-1,0,-1):
        dp[i][j]=dp[i-1][j-1]
        if 2*j<=M:
            dp[i][j]+=dp[i][2*j]
        dp[i][j]%=mod


print((dp[N][K]))
        
# for i in range(N+1):
#     print(dp[i])
    


N, K = list(map(int, input().split()))
mod = 998244353
dp = [0] *(N+1)
dp[0] = 1
for i in range(1, N+1):
    for j in range(i, -1, -1):
        dp[j] =dp[j-1]
        if j*2 <= i:
            dp[j] += dp[2*j]
        dp[j] %= mod
print((dp[K]))


N, K = list(map(int, input().split()))
MOD = 998244353

# dp[i][j] := 要素数 i で、合計が j になるような集合の個数
dp = [[0] * (N + 1) for _ in range(N + 1)]

for i in range(1, N + 1):
    # dp[i][N], ..., dp[i][i+1] = 0 (初期値のまま)

    # 全て1を入れる時の1通りのみ
    dp[i][i] = 1

    for j in range(i - 1, 0, -1):
        # 1を使う場合
        # j-1を、i-1個の[1, 1/2, 1/4,...]に分ける場合の数

        # 1を使わない場合 -> 全てを2倍して考える
        # 2*jを、i個の[1, 1/2, 1/4,...]に分ける場合の数
        # 2*j > i の場合、実現不可能

        if 2 * j <= i:
            dp[i][j] = dp[i - 1][j - 1] + dp[i][2 * j]
        else:
            dp[i][j] = dp[i - 1][j - 1]
        dp[i][j] %= MOD

print((dp[N][K] % MOD))


N,K=list(map(int,input().split()))
m=998244353
dp = [[0]*(N+1) for _ in range(N+1)]
dp[0][0]=1
for n in range(1,N+1):
    for k in range(N,-1,-1):
        if 2*k<=N:
            dp[n][k]=(dp[n-1][k-1]+dp[n][2*k])%m
        else:
            dp[n][k] =(dp[n-1][k-1])%m
print((dp[N][K]))


import sys
import math
from collections import defaultdict


def input():
    return sys.stdin.readline().rstrip()


def main():
    N, K = list(map(int, input().split()))
    mod = 998244353

    dp = [0] *(N+1)

    dp[0] = 1

    for i in range(1, N+1):
        for j in range(i, -1, -1):
            dp[j] =dp[j-1]
            if j*2 <= N:
                dp[j] += dp[2*j]
            dp[j] %= mod

    print((dp[K]))


def __starting_point():
    main()

__starting_point()

N, K = list(map(int, input().split()))
C = 998244353

dp = [[0]*(N+1) for _ in range(N+1)]
dp[0][0] = 1
for i in range(1, N+1):
    for j in range(N, 0, -1):
        if j > i:
            continue
        dp[i][j] = dp[i-1][j-1]
        if 2*j <= N:
            dp[i][j] = (dp[i][j]+dp[i][2*j]) % C
print((dp[N][K]))



N,K=list(map(int,input().split()))
Mod=998244353

DP=[0]*(N+1)
DP[0]=1

for x in range(1,N+1):
    ODP,DP=DP,[0]*(N+1)
    for k in range(N,-1,-1):
        DP[k]=ODP[k-1]
        if 2*k<=N:
            DP[k]+=DP[2*k]
            DP[k]%=Mod

print((DP[K]))


n,k = map(int,input().split())
a = [[0]*(n+1) for i in range(n+1)]
for i in range(1,n+1):
  for j in range(i,0,-1):
    if i==j:
      a[i][j] = 1
    elif j>0:
      a[i][j] = a[i-1][j-1]
      if i>=2*j:
        a[i][j] += a[i][2*j]
        a[i][j] %= 998244353
print(a[n][k])

n,k=map(int,input().split())
dp=[[0]*(2*n+1) for _ in range(n+1)]
dp[0][0]=1
mod=998244353
for i in range(1,n+1):
    for j in reversed(range(n+1)):
        dp[i][j]+=dp[i][2*j]
        if j>0:
            dp[i][j]+=dp[i-1][j-1]
        dp[i][j]%=mod
print(dp[n][k])

n, k = map(int, input().split())
MOD = 998244353


dp = [[0] * (n + 1) for i in range(n + 1)]
dp[0][0] = 1

for i in range(n):
    for j in range(1, n + 1)[::-1]:
        dp[i + 1][j] += dp[i][j - 1]
        if 2 * j <= n:
            dp[i + 1][j] += dp[i + 1][2 * j]
        dp[i + 1][j] %= MOD

print(dp[n][k] % MOD) 

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

MOD = 998244353

dp = [[0 for i in range(N+1)] for j in range(N+1)]

dp[1][1] = 1

for i in range(1,N+1):
    for j in range(N,0,-1):
        if (i,j) == (1,1):
            continue
        else:
            dp[i][j] = (dp[i-1][j-1] + (dp[i][2*j] if 2*j <= N else 0)) % MOD

print((dp[N][K]))



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

dp = [[0]*(2*N+1) for _ in range(N+1)]
dp[0][0] = 1

for i in range(1,N+1):
    for j in range(N,0,-1):
        if i < j: continue
        dp[i][j] += dp[i-1][j-1] + dp[i][2*j]
        dp[i][j] %= MOD
print(dp[N][K])

import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

mod = 998244353
n,k = m()

dp = [[0 for i in range(n+1)] for j in range(n+1)]

dp[0][0] = 1
for i in range(1,n+1):
    for j in range(n,-1,-1):
        if 2*j <= n:
            dp[i][j] = dp[i-1][j-1] + dp[i][2*j]
            dp[i][j] %= mod
        else:
            dp[i][j] = dp[i-1][j-1]
            dp[i][j] %= mod

print(dp[n][k])

n,k = map(int,input().split())
mod = 998244353
dp = [[0]*(n+1) for _ in range(n+1)]
dp[1][1] = 1
for i in range(2,n+1):
    for j in range(i,0,-1):
        if 2*j<=i:
            dp[i][j] = (dp[i-1][j-1] + dp[i][2*j])%mod
        else:
            dp[i][j] = dp[i-1][j-1]%mod
print(dp[n][k])


mod = 998244353
n,k = map(int,input().split())

dp = [[0]*(n+1) for i in range(n+1)]
dp[0][0] = 1
for i in range(1,n+1):
    for j in range(i,-1,-1):
        if j:
            dp[i][j] += dp[i-1][j-1]
        if j*2 <= i:
            dp[i][j] += dp[i][j*2]
        dp[i][j] %= mod
print(dp[n][k])

import sys
try:
    import os
    f = open('input.txt', 'r')
    sys.stdin = f
except FileNotFoundError:
    None
from math import sqrt, ceil, floor
from collections import deque, Counter, defaultdict
# defaultdict(int)
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright, insort
from itertools import combinations as com, permutations as per
from fractions import Fraction as frac  #frac(a,b)で正確なa/b
# @lru_cache(maxsize=10**10)
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########

n,k=list(map(int,input().split()))
mod=998244353
# @lru_cache(maxsize=10**10)
# def saiki(n,k):
#     print(n,k,flush=1)
#     if n<k:return 0
#     if n==k:return 1
#     if n==0:return 0
#     if k==0: return 0
#     if n==1:return 1
#     if k==1: return saiki(n,2*k)
#     return (saiki(n-1,k-1)+ saiki(n,2*k))%mod

dp=[[0]*3002 for  i in range(3003)]
# dp[1][1]=1
for i in range(1,n+1):
    for j in range(n,0,-1):
        if i<j:dp[i][j]=0
        elif i==j : dp[i][j]=1
        elif 2*j >i: dp[i][j]=dp[i-1][j-1]
        else: dp[i][j]=(dp[i-1][j-1]+ dp[i][2*j])%mod

print((dp[n][k]))


from pprint import *
def modpow(a,n,p):
    if n==0:
        return 1
    x=modpow(a,n//2,p)
    x=(x*x)%p
    if (n%2)==1:
        x=(x*a)%p
    return x%p
def modinv(a,p):
    return modpow(a,p-2,p)
N,K=list(map(int,input().split()))
p=998244353
dp=[[-1 for _ in range(N+1)] for _ in range(N+1)]
for i in range(N+1):
    dp[i][i]=1
for i in range(1,N+1):
    dp[i][0]=0
for i in range(1,N+1):
    for j in range(0,i):
        dp[j][i]=0
#pprint(dp)
for i in range(1,N+1):
    for j in range(N,0,-1):
        #print(i,j)
        if dp[i][j]==-1:
            if 2*j<=i:
                dp[i][j]=(dp[i-1][j-1]+dp[i][2*j])%p
            else:
                dp[i][j]=dp[i-1][j-1]%p
        #pprint(dp)
print((dp[N][K]))


N, K = map(int, input().split())
mod = 998244353
dp = [0] *(N+1)
dp[0] = 1
for i in range(1, N+1):
    for j in range(i, -1, -1):
        dp[j] =dp[j-1]
        if j*2 <= i:
            dp[j] += dp[2*j]
        dp[j] %= mod
print(dp[K])

N, K = map(int, input().split())
MOD = 998244353
dp = [[0]*(N+1) for _ in range(N+1)]
dp[1][1] = 1

def get_dp(n, k):
    try:
        return dp[n][k]
    except:
        return 0


for n in range(2, N+1):
    for k in range(n, -1, -1):
        dp[n][k] = get_dp(n-1, k-1) + get_dp(n, 2*k)
        dp[n][k] %= MOD

print(dp[N][K])

N, K = list(map(int, input().split()))
MOD = 998244353

# dp[i][j] := 要素数 i で、合計が j になるような集合の個数
dp = [[0] * (N + 1) for _ in range(N + 1)]

for i in range(1, N + 1):
    # dp[i][N], ..., dp[i][i+1] = 0 (初期値のまま)

    # 全て1を入れる時の1通りのみ
    dp[i][i] = 1

    for j in range(i - 1, 0, -1):
        # 1を使う場合
        # j-1を、i-1個の[1, 1/2, 1/4,...]に分ける場合の数

        # 1を使わない場合 -> 全てを2倍して考える
        # 2*jを、i個の[1, 1/2, 1/4,...]に分ける場合の数
        # 2*j > i の場合、実現不可能

        if 2 * j <= i:
            dp[i][j] = dp[i - 1][j - 1] + dp[i][2 * j]
        else:
            dp[i][j] = dp[i - 1][j - 1]
        dp[i][j] %= MOD

print((dp[N][K] % MOD))


import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write(' '.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
#from decimal import Decimal
#from fractions import Fraction
sys.setrecursionlimit(100000)
INF = float('inf')
mod = 998244353


n,k=mdata()
dp=[[0]*(n+1) for i in range(n+1)]
dp[0][0]=1
dp[1][1]=1
dp1 = [0] * (2 * n + 1)
for i in range(2,n+1):
    for j in range(i,0,-1):
        dp[i][j] = (dp[i-1][j-1] + dp1[2*j])%mod
        dp1[j] = dp[i][j]%mod
out(dp[n][k])


N, K = map(int, input().split())
mod = 998244353
dp = [[0]*(N+1) for _ in range(N+1)]

dp[1][1] = 1

for n in range(2,N+1):
  for k in range(n,0,-1):
    if 2*k <= n:
      dp[n][k] = (dp[n-1][k-1] + dp[n][2*k]) % mod
    else:
      dp[n][k] = dp[n-1][k-1] % mod
      
print(dp[N][K])

n, k = map(int, input().split())
dp = [[0] * (2*n+1) for _ in range(n+1)]
dp[0][0] = 1
for i in range(1, n+1):
    for j in reversed(range(i+1)):
        dp[i][j] = (dp[i-1][j-1] + dp[i][2*j]) % 998244353
print(dp[n][k])

N,K = map(int,input().split())
dp = [[0]*n for n in range(1,N+2)]
for n in range(N+1):
    dp[n][n] = 1
    for k in reversed(range(1,n)):
        if 2*k <= n:
            dp[n][k] = (dp[n-1][k-1] + dp[n][2*k])% 998244353
        else:
            dp[n][k] = dp[n-1][k-1]
    dp[n][0] = 0
#    print(dp)
print(dp[N][K])

import sys
import math
from collections import defaultdict


def input():
    return sys.stdin.readline().rstrip()


def main():
    N, K = list(map(int, input().split()))
    mod = 998244353

    dp = [[0]*(N+1) for _ in range(N+1)]

    dp[0] = [1] + [0]*N

    for i in range(1, N+1):
        for j in range(i, 0, -1):
            dp[i][j] += dp[i-1][j-1]
            if j*2 <= N:
                dp[i][j] += dp[i][2*j]
            dp[i][j] %= mod

    print((dp[N][K]))


def __starting_point():
    main()

__starting_point()


def main():
    N, K = list(map(int, input().split()))
    mod = 998244353

    dp = [0] *(N+1)

    dp[0] = 1

    for i in range(1, N+1):
        for j in range(i, -1, -1):
            dp[j] =dp[j-1]
            if j*2 <= N:
                dp[j] += dp[2*j]
            dp[j] %= mod

    print((dp[K]))


def __starting_point():
    main()

__starting_point()

import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
from collections import deque, defaultdict, Counter
import heapq
from functools import reduce
from itertools import permutations
import math
import bisect

def main():
    mod = 998244353
    def comp(x, y):
        if x < y:
            return 0
        return dp[x][y]
    N, K = MI()
    dp = [[0 for _ in range(N + 1)]for _ in range(N + 1)]
    dp[0][0] = 1
    dp[0][1] = 0
    dp[1][0] = 0
    dp[1][1] = 1
    for i in range(2, N + 1):
        for j in range(N, 0, -1):
            dp[i][j] = comp(i - 1, j - 1) + comp(i, 2 * j)
            dp[i][j] %= mod
    #print(dp)
    print((dp[N][K]))
def __starting_point():
    main()

__starting_point()

# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


def gen_2d_array(n, m, fill=0):
    if callable(fill):
        return [[fill()] * m for _ in range(n)]
    else:
        return [[fill] * m for _ in range(n)]


def gen_3d_array(n, m, k, fill=0):
    if callable(fill):
        return [[[fill()] * k for _ in range(m)] for _ in range(n)]
    else:
        return [[[fill] * k for _ in range(m)] for _ in range(n)]


@mt
def slv(N, K):
    memo = gen_2d_array(N+1, 2*N+1)
    memo[0][0] = 1
    M = 998244353
    for n in range(1, N+1):
        for k in range(n, 0, -1):
            memo[n][k] = (memo[n-1][k-1] + memo[n][k*2]) % M
    return memo[N][K]

def main():
    N, K = read_int_n()
    print(slv(N, K))


def __starting_point():
    main()

__starting_point()

N, K = map(int, input().split())
M = 998244353
dp = [[0 for _ in range(N + 1)] for _ in range(N + 1)]
dp[0][0] = 1
for i in range(1, N + 1):
    for j in range(N, 0, -1):
        dp[i][j] = dp[i - 1][j - 1]
        if 2 * j <= N:
            dp[i][j] += dp[i][2 * j]
        dp[i][j] %= M
print(dp[N][K])

MOD = 998244353


def solve(n, k):

    dp = [[0] * (n + 1) for _ in range(n + 1)]
    dp[0][0] = 1

    for i in range(1, n + 1):
        for j in range(i, -1, -1):
            if 2 * j <= i:
                dp[i][j] = (dp[i - 1][j - 1] + dp[i][2 * j]) % MOD
            else:
                dp[i][j] = dp[i - 1][j - 1]
    # print(dp)
    return dp[n][k]


def main():
    n, k = list(map(int, input().split()))
    res = solve(n, k)
    print(res)


def test():
    assert solve(4, 2) == 2
    assert solve(2525, 425) == 687232272


def __starting_point():
    test()
    main()

__starting_point()

# dp[i, j] = number of ways to decompose j into i values
# dp[i, j] = 0 if i < j
# dp[0, K] = 1
# dp[i, j] = dp[i - 1, j - 1] + dp[i, 2 * j]

N, K = list(map(int, input().split()))
M = 998244353
dp = [[0 for _ in range(2 * N + 1)] for _ in range(N + 1)]
dp[0][0] = 1
for i in range(1, N + 1):
    for j in range(N, 0, -1):
        dp[i][j] = dp[i - 1][j - 1]
        dp[i][j] += dp[i][2 * j]
        dp[i][j] %= M
# print(dp)
print((dp[N][K]))



# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


def gen_2d_array(n, m, fill=0):
    if callable(fill):
        return [[fill()] * m for _ in range(n)]
    else:
        return [[fill] * m for _ in range(n)]


def gen_3d_array(n, m, k, fill=0):
    if callable(fill):
        return [[[fill()] * k for _ in range(m)] for _ in range(n)]
    else:
        return [[[fill] * k for _ in range(m)] for _ in range(n)]


@mt
def slv(N, K):
    memo = gen_2d_array(N+1, 2*N+1)
    memo[0][0] = 1
    M = 998244353
    for n in range(1, N+1):
        for k in range(n, 0, -1):
            memo[n][k] = (memo[n-1][k-1] + memo[n][k*2]) % M
    return memo[N][K]

def main():
    N, K = read_int_n()
    print(slv(N, K))


def __starting_point():
    main()

__starting_point()

def main():
    mod = 998244353
    n, k = list(map(int, input().split()))
    dp = [[0]*(n+1) for _ in [0]*(n+1)]
    dp[0][0] = 1
    for i in range(1, n+1):
        for j in range(n, 0, -1):
            if 2*j <= n:
                dp[i][j] = (dp[i-1][j-1]+dp[i][2*j]) % mod
            else:
                dp[i][j] = dp[i-1][j-1]

    print((dp[n][k]))


main()


n,k = list(map(int,input().split()))
dp = [[0 for i in range(j+1)] for j in range(n+1)]
mod = 998244353
for i in range(1,n+1):
  dp[i][i] = 1
for i in range(2,n+1):
  for j in range(1,i):
    t = max(1,j-1)
    while t <= i-1:
      dp[i][j] += dp[i-1][t]
      t = t*2+1
    dp[i][j] %= mod
print((dp[n][k]))


import sys
def input(): return sys.stdin.readline().strip()


def main():
    mod = 998244353
    N, K = list(map(int, input().split()))
    """
    １を使うか使わないかで場合分けする発想はどうして出てくるんだ。。。
    再帰構造が見える感じ？？？
    再帰で実装すると間に合わなかったのでdpテーブルで実装。
    dp[n][k] = dp[n - 1][k - 1] + dp[n][k * 2]
    """
    dp = [[0] * (N * 2 + 5) for _ in range(N + 1)]  # dp[n][k] = (n個の要素でkを表す場合の数)
    dp[0][0] = 1
    dp[1][1] = 1
    
    for n in range(1, N + 1):
        for k in range(n, -1, -1):
            dp[n][k] = dp[n - 1][k - 1] + dp[n][k * 2]
            dp[n][k] %= mod
    #for n in range(N + 1): print(n, dp[n])
    
    print((dp[N][K]))

def __starting_point():
    main()





__starting_point()

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


N,K = MI()
mod = 998244353

dp = [[0]*(N+1) for _ in range(N+1)]
dp[0][0] = 1
for i in range(1,N+1):
    for j in range(N,0,-1):
        dp[i][j] = dp[i-1][j-1]
        if 2*j <= N:
            dp[i][j] += dp[i][2*j]
            dp[i][j] %= mod
print((dp[-1][K]))


def resolve():
  mod = 998244353
  N, K = list(map(int, input().split(" ")))

  # dp = [[0]*(K+1) for _ in range(N+1)]
  dp = [[0]*(N+1) for _ in range(N+1)]
  for n in range(N+1):
    dp[n][n] = 1

  for n in range(1, N+1):
    for k in range(n, 0, -1):
      result = dp[n-1][k-1]
      if 2*k <= n: result += dp[n][2*k]
      dp[n][k] = result%mod if result > mod else result
  
  print((dp[N][K]))

def __starting_point():
  resolve()

__starting_point()

def ans(n,k):
    dp = [[0 for x in range(6001)]for y in range(6001)]
    dp[1][1]=1
    for i in range(2,n+1):
        for j in range(3000,0,-1):
            dp[i][j]=(dp[i-1][j-1]+dp[i][2*j])%998244353
    print(dp[n][k])
n,k=(int(x) for x in input().split())
ans(n,k)

N, K = list(map(int, input().split()))
P = 998244353
dp = [[0] * (N+1) for _ in range(N+1)]  # i個使って=Kのパターン
dp[0][0]=1
# dp[i][k] = dp[i-1][k-1] + dp[i][2*k]
for i in range(1, N + 1):
    for k in range(N, 0, -1):
        if 2 * k <= N:
            dp[i][k] = (dp[i - 1][k - 1] + dp[i][2 * k])%P
        else:
            dp[i][k] = dp[i-1][k-1]
print((dp[N][K]))


#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
#R = 10**9 + 7
R = 998244353

def ddprint(x):
  if DBG:
    print(x)

n,k = inm()
dp = [[0]*(n+1) for i in range(n+1)]
dp[0][0] = 1
for i in range(1,n+1):
    for j in range(i,0,-1):
        dp[i][j]=(dp[i-1][j-1]+(dp[i][2*j] if 2*j<=i else 0))%R
print(dp[n][k])