Function to return the count of required strings
def countStr ( i , s ) : NEW_LINE INDENT if ( i < 0 ) : NEW_LINE INDENT if ( check ( s ) ) : NEW_LINE INDENT return 1 ; NEW_LINE DEDENT return 0 ; NEW_LINE DEDENT s [ i ] = '0' ; NEW_LINE ans = countStr ( i - 1 , s ) ; NEW_LINE s [ i ] = '1' ; NEW_LINE ans += countStr ( i - 1 , s ) ; NEW_LINE s [ i ] = '0' ; NEW_LINE return ans ; NEW_LINE DEDENT