Actually, I think we can omit the len == 0 test, since `-1/N+1 == 1` for integer division.