At the end of a rainbow, a leprechaun is guarding a pot of gold coins. He adds 39 gold coins to the pot, then another 47. However, while he is distracted, a fairy takes away 8 gold coins from the pot. The new total of coins becomes a code to a magical lock. The code must be enhanced by adding 48 to it only once, and then multiplied by 24. What is the final value to unlock the magical lock?