Beads were placed in 2 containers, A and B, in the ratio of 5 : 3. After 20 beads were removed from A and 24 beads were added to Container B, the number of beads in Container A was $\frac{2}{3}$ the number of beads in Container B. How many beads were there in Container A at first?