Simplified takeInputWithLeftoversD