Margaret has 13 more red pencils than orange pencils, and 3 more orange pencils than brown pencils. The brown pencils are 3 centimeters shorter than the red and orange pencils. She has 18 brown pencils. How many red, orange, and brown pencils does Margaret have in all?