To finish an order on time, a company has to produce 40 items each day. But the company manages to complete 20 more items each day than it needs to, and finishes the order 3 days ahead of time. In how many days was the company supposed to finish the order?.