A can finish a piece of work in 14 days. The same work can be finished by B in 21 days. They start the work together, but 3 days before the completion of the work, A leaves. What is the total number of days required to complete the work, had both of them worked together?