John built a pyramid using cubes. At the top level of the pyramid there is one cube, at the second top level - 3 cubes in the form of a triangle, at the third top level - 6 cubes in the form of a triangle, and so on. After entering the height of the pyramid Scratch cat will tell you the total number of cubes in the pyramid.
This is solution for Algorithmic task in Scratch Creative Programming Olympiad, Nomination "ScratchChild" created by myself, Michael Telenkevich. I'd like to thank my parents for helping and supporting me, teachers in school of programming "Kubik Rubik" for teaching and inducing me.