Calculating the volume of rectangular prisms