eolymp
bolt
Try our new interface for solving problems
Problems

Match’s model

Match’s model

\includegraphics{https://static.eolymp.com/content/cd/cdd92e6687f720de9f39b51124880acafdccb0c1.jpg} Professor Samodelkin decided to make a three-dimensional model of cubes from matches using matches for the edges of the cubes. The length of the edge of each cube is equal to one match. He used $28$ matches to build a model of three cubes. What is the smallest number of matches needed by Samodilkin to build a model of $n$ cubes. All numbers in this problem do not exceed $2 \cdot 10^9$. \InputFile One number $n$ is the number of cubes. \OutputFile The number of matches needed.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1
Output example #1
12