from scipy.special import comb n,m=map(int,input().split()) print(comb(m+1,n+1,exact=True)%(10**9+7))