Use ceil_sqrt() instead of ceil(sqrt())