Function to return the number of total possible combinations of 0 and 1 to form an array of size N having sum of product of consecutive elements K
def combinationsPossible ( N , idx , prev , val , K , dp ) : NEW_LINE