Aunt Rebecca is pricing cakes for a baby shower she is throwing. She wants one large cake shaped like a duckling and also some cupcakes in pastel colors. Winchester Bakery charges $4 for each cupcake, plus $30 for the large cake. Linda's Sweet Shoppe charges $40 for the large cake and $2 for each cupcake. If Aunt Rebecca orders a certain number of cupcakes, the cost will be the same at either bakery. What would the total cost be?