Bag A has twice the number of beads in bag B. Twelve percent of beads in bag A are transferred to bag C, and 20% of beads in bag B are transferred to bag C. After transferring beads, there are now 488 beads in bag C, which is 22% more than the original number of beads in bag C. How many beads were in bag A at the beginning?