import sys #input = sys.stdin.readline #input = sys.stdin.buffer.readline #文字列はダメ #sys.setrecursionlimit(1000000) #import bisect #import itertools #import random #from heapq import heapify, heappop, heappush #from collections import defaultdict #from collections import deque #import copy #import math #from functools import lru_cache #@lru_cache(maxsize=None) #MOD = pow(10,9) + 7 MOD = 998244353 #dx = [1,0,-1,0] #dy = [0,1,0,-1] #dx8 = [1,1,0,-1,-1,-1,0,1] #dy8 = [0,1,1,1,0,-1,-1,-1] def solve(a,b): #a -> bへ行く場合の数 n = abs(a-b) dp = [0]*(n+1) dp[0] = 1 for i in range(n): dp[i+1] = dp[i] if i-2 >= 0: dp[i+1] += dp[i-2] dp[i+1] %= MOD return dp[n] def main(): N,X,Y = map(int,input().split()) if N == 2 or N == 3: print(1);exit() if X < Y: X,Y = Y,X #常にX > Y if X == N: a = X else: a = X-1 if Y == 1: b = 1 else: b = Y+1 if a < b: print(0) else: print(solve(a,b)) if __name__ == '__main__': main()