A bag contains yellow marbles and blue marbles, 42 in total. The number of yellow marbles is 2 less than 3 times the number of blue marbles. How many yellow marbles are there?