Changyoung loves beer and keeps it in a refrigerator. Storing food and beer together in an ordinary refrigerator left less and less room for the beer, so he decided to build a refrigerator dedicated to beer.
The refrigerator he builds is a rectangular box of size a × b × c, and it holds exactly n cube-shaped beer boxes, each of size 1 × 1 × 1. In other words, a × b × c = n. To keep the beer fresh, the surface area of the refrigerator must be as small as possible. The surface area of the box is 2 × (a·b + b·c + c·a).
For example, when n = 12 the following refrigerators are possible.
| Size | Surface area |
|---|---|
| 2 × 2 × 3 | 32 |
| 1 × 3 × 4 | 38 |
| 1 × 2 × 6 | 40 |
| 1 × 1 × 12 | 50 |
Among these, the refrigerator with the smallest surface area is 2 × 2 × 3, whose surface area is 32.
Write a program that, given n, computes the smallest possible surface area of a rectangular refrigerator whose volume is exactly n.
The first line contains an integer n. (1 ≤ n ≤ 1,000,000)
Print the smallest possible surface area of a rectangular refrigerator whose volume is n.