Time limit
2s
Memory limit
128 MB
There is an infinite RPG world made of hexagonal blocks. A character has N items, each of which can turn one normal block into a fence block. Use all N items so that the fence blocks are connected, and find the maximum possible area of territory.
Blocks enclosed by the fence are counted as territory, and the fence blocks themselves are also counted. The map is infinite.
The first line contains the number of items N.
Print the maximum number of blocks that can be occupied.