# your code goes here

def binary(path):
	return ''.join('1'+'0'*(step-1) for step in path)
		

def recursion_zenik(n,k,path=[]):
	if n==0:
		if path and max(path)-min(path)>k:
			print(binary(path),'fail')
			return 0
		print(binary(path),'ok')
		return 1
	return sum(recursion_zenik(n-i,k,path+[i]) for i in range(1,n+1))

print('Result =',recursion_zenik(6,2))