n, m = map(int, input().split()) res = 1 j = m + n for i in range(1, m): res *= j # (m+n)!/(m-1)! res //= i # (m-1)! j -= 1 res1 = res * (n+1) res1 = res1 // m print(res1 - res)