def sqrt(number):
    """
    Calculate the floored square root of a number

    Args:
        number(int): Number to find the floored squared root
    Returns:
        int: Floored Square Root
    """
    if number < 0 or number is None:
        return None
    elif number == 0:
        return 0
    elif number == 1:
        return 1

    previous = 0
    n = number // 2

    while True:
        if n * n == number:
            return n
        elif n * n < number:
            return previous - 1
        else:
            previous = n
            n = n // 2