Telephone poles are stored in a pile with 30 poles in the first layer, 29 in the second, and so on. If there are 12 layers, how many telephone poles does the pile contain?