A mechanical pencil has a mass of 47.4 grams. The volume of the pencil is 15.8 cubic centimeters. What is the density of the pencil?