import sys input=lambda:sys.stdin.readline().rstrip() N,M=map(int,input().split()) dp=[1 for i in range(M+1)] for i in range(N,M+1): dp[i]=dp[i-1]+dp[i-N] print(dp[M])