There are at most 36 red and blue marbles in a bag. The number of red marbles is twice the number of blue marbles. Write and solve an inequality tang represents the greatest number of red marbles r in the bag.