A bag contains purple marbles and yellow marbles, 30 in total. The number of purple marbles is 6 more than 3 times the number of yellow marbles. How many purple marbles are there?