At the beginning of a marble game, Abby, Brea, and Cleo were each given some marbles. Then, Abby gave Brea and Cleo some of her marbles, which doubles the number of marbles Brea and Cleo each had. Finally, Brea gave Abby and Cleo some of her marbles, which doubles the number of marbles Abby and Cleo each had. If Brea had 10 marbles at the beginning and 0 marbles at the end, what is the total number of marbles that were given to the three of them at the beginning of the game?