Folding integer square roots.