Fix: if res is negative `res = PRIME + res`