A can finish a piece of work in 36 days, B can finish it in 54 days, and C can finish it in 72 days. All three start the work together, but A leaves 8 days before the work is completed, and B leaves 12 days before the work is completed. For how many days in all did C work, till the entire work was finished?