def getCount(m,n):
if m == 0 or n == 1:
return 1
if m < n:
return getCount(m,m)
else:
return getCount(m,n-1) + getCount(m-n,n)
while True:
try:
m, n = raw_input().split(' ')
print getCount(int(m),int(n))
except:
break
results = [[1 for i in xrange(21)] for j in xrange(21)]
for i in xrange(1,21):
for j in xrange(2, 21):
if i < j:
results[i][j] = results[i][i]
else:
results[i][j] = results[i-j][j] + results[i][j-1]
while True:
try:
m, n = map(int, raw_input().split(' '))
print results[m][n]
except:
break