Marva bought an equal number of red and white pieces of cloth. She bought a total of 336 m of cloth. Each piece of red cloth is 15.5 m long. Each piece of white cloth is 3 m shorter than each piece of red cloth. How many pieces of red and white cloth altogether did she buy?