During a recent expedition, three intrepid adventurers were left stranded in the middle of the desert with only a crate full of apples.
During the night, Alex woke up and decided to hide some of the apples and hid a third, then promptly fell asleep again.
Billie woke up shortly after and also decided to hide a third of the remaining apples and then also dozed back to sleep.
Finally, Charlie woke up and seeing the others were asleep, took a third of what was left.
Of course, none of the adventurers knew of the other's antics, so, in the morning, they shared the remaining apples, each receiving sixteen. How many apples were in the crate originally?