If the current position is odd add it to currOdd , otherwise to currEven
if ( pos & 1 ) : NEW_LINE INDENT currOdd += d NEW_LINE DEDENT else : NEW_LINE INDENT currEven += d NEW_LINE DEDENT ans += count ( pos + 1 , currEven , currOdd , currF , num ) NEW_LINE return ans NEW_LINE