Nails are sold in packets of size X and size Y. There are 250 nails in a size X packet. There are 500 nails in a size Y packet. A builder buys p p\,p packets of size X and q q\,q packets of size Y.
Write an expression for the total number of nails the builder buys.