add calculate gcd if impossible mod n