At first, a container contained 7 yellow balls and some pink beads. After some yellow balls were added, 37 of the balls were pink. After 30 blue balls were added to the container and now, 313 of the beads were pink. What was the number of yellow balls added?