Find S Algorithm Using Python Pip