Adjust integer sqrt newton's method based on input size