Jenny has 9 red colored pencils in her art box. She also has some green colored pencils which amounts to 38 minus the number of red colored pencils she has. The total number of times she used all the pencils is the product of the number of green and red pencils she has. How many times did she use all her pencils?