Write a function to count sequences of given length having non-negative prefix sums that can be generated by given values.
def bin_coff(n, r): 
	val = 1
	if (r > (n - r)): 
		r = (n - r) 
	for i in range(0, r): 
		val *= (n - i) 
		val //= (i + 1) 
	return val 
def find_ways(M): 
	n = M // 2
	a = bin_coff(2 * n, n) 
	b = a // (n + 1) 
	return (b) 
<s>[INST]<<SYS>>Given a task and its code, generate test cases for the code.<</SYS>>Write a function to count sequences of given length having non-negative prefix sums that can be generated by given values.
def bin_coff(n, r): 
	val = 1
	if (r > (n - r)): 
		r = (n - r) 
	for i in range(0, r): 
		val *= (n - i) 
		val //= (i + 1) 
	return val 
def find_ways(M): 
	n = M // 2
	a = bin_coff(2 * n, n) 
	b = a // (n + 1) 
	return (b) [/INST]assert find_ways(4) == 2
assert find_ways(6) == 5
assert find_ways(8) == 14</s>