Match’s model
Hard
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
![](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 matches to build a model of three cubes.
What is the smallest number of matches needed by Samodilkin to build a model of cubes.
All numbers in this problem do not exceed .
Input
One number is the number of cubes.
Output
The number of matches needed.
Examples
Input #1
Answer #1
Submissions 89K
Acceptance rate 8%