import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
Scanner in
= new Scanner
(System.
in); double n = in.nextDouble();
double length
= Math.
floor(Math.
sqrt(n
)); double width
= Math.
ceil(n
/ length
); double k = 2 * n + length + width;
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWRvdWJsZSBuID0gaW4ubmV4dERvdWJsZSgpOwoJCWRvdWJsZSBsZW5ndGggPSBNYXRoLmZsb29yKE1hdGguc3FydChuKSk7CgkJZG91YmxlIHdpZHRoID0gTWF0aC5jZWlsKG4gLyBsZW5ndGgpOwoJCWRvdWJsZSBrID0gMiAqIG4gKyBsZW5ndGggKyB3aWR0aDsKCQlTeXN0ZW0ub3V0LnByaW50KChpbnQpKGspKTsKCX0KfQ==