Zantia, on a very bored day, decided to arrange cubes of sugar in a triangular pyramid. She put one cube in the top layer, three cubes in the second layer, six in the third layer, and so on. Each layer, except the top, formed an equilateral triangle. How many cubes would it take to build such a pyramid 50 layers high?