def count(N,M): if N==1: if M==1 or M==-1: return 1 else: return 0 else: return count(N-1,N-M)+count(N-1,M+N) N,M=map(int,input().split()) res=count(N,M) print(res)