max(floor(sqrt(n)), n-(floor(sqrt(n))