The number of pens used varies directly with the number of pieces of paper needed. If 12 pens are used when 40 pieces of paper are needed, how many pens will be used when 240 pieces of paper are needed?