A, B and C can do a piece of work in 16, 32 and 48 days, respectively. They started working together but C left after working 4 days and B, 2 days before the completion of work. How many days it took to comlete the work?