E. 最小周长

    Type: Default 1000ms 256MiB

最小周长

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

一个矩形的面积为S,已知该矩形的边长都是整数,求所有满足条件的矩形中,周长的最小值。例如:S = 24,那么有{1 24} {2 12} {3 8} {4 6}这4种矩形,其中{4 6}的周长最小,为20。

Input

输入1个整数S(1≤S≤10^9^)。

Output

输出最小周长。

Sample Input

24

Sample Output

20

1.17竞赛B班

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2025-1-17 13:45
End at
2025-1-17 15:45
Duration
2 hour(s)
Host
Partic.
11