Solved MyVeryLongCake via Euler's totient function.