uses math; var cl, c2, c3, s, h,dl,d2,n:int64; begin readln(n); cl:=trunc(power(n,1/3)+0.5); c2;=trunc(sqrt(n/cl)+0.5); c3:=trunc(n/(cl*c2)) ; S:=3*cl*c2*c3+2*(cl*c2+cl*c3+c2*c3)+ (cl+c2+c3); h:=n-cl*c2*c3; if h<>0 then begin dl:=trunc(sqrt(h)+0.5); if dl*dl>h then dec(dl); d2:=trunc(h/dl) ; s:=s+3*dl*d2+2*(dl+d2)+1 ; h:=h-dl*d2; if h<>0 then s:=s+3*h+2; end; writeln (s); end. 53