3 kids Payal, Tanya and Vaidehi got some chocolates.

Payal gave Tanya and Vaidehi as many chocolates as they already had.

Then Tanya gave Payal and Vaidehi as many chocolates as they already had.

Finally, Vaidehi gave Tanya and Payal as many chocolates as they already had.

Now each of them has 24 chocolates.

How many chocolates they had originally?