Tasks:
 
Task DescriptionDiscussion (0)
Task :: Kate i Luce
Kate has decided to start breeding ostriches. For breeding ostriches, it is necessary to have a rectangular surface of P square meters, which should be fenced with wire. As the initial capital is barely enough to buy ostrich, and her neighbors Luce said that she could save money on the fence, if she chooses a suitable size of the rectangle.

She begs you to help her. Write a program whose input data will be P - the required land area, and will print what is the minimum length of the wire which will completely enclose a rectangular piece of land with the given area P

Note:
The length and the width of the land must be integer.


INPUT:
Natural number P (1 ≤ P ≤ 30 000) - surface (in square meters) of land required for breeding ostriches.


OUTPUT:
Natural number D - the minimum wire length in meters, which is necessary in order to hedge land.


Input:
20

Output:
18

Input:
7

Output:
16
Submit Solution
:
:
Available Languages
Task info
Name:Kate i Luce
Time:0.1 sec.
Memory:64 MB
#Tests:6
AddedBy: dario-dsa
Source:DMIH 05
Task Ratings
Difficulty:

2.5 (25 votes)
Quality:

3.6 (20 votes)
Acceptance Rate
Recent Submissions
Fastest Solutions
UserTime
royalrapier 0 s.
seanmcrayz 0 s.
darkspirit 0 s.
vasja 0 s.
dejandenib 0 s.
dario-dsa 0 s.
mmilisic 0 s.
vartic 0 s.
DuXSerbia 0 s.
hamedvalizadeh 0 s.
Solved By