MG is a rich boy. He has $n$ apples, each has a value of V($0<=V<=9$).
A valid number does not contain a leading zero, and these apples have just made a valid $N$ digit number.
MG has the right to take away $K$ apples in the sequence, he wonders if there exists a solution: After exactly taking away $K$ apples, the valid $N-K$ digit number of remaining apples mod $3$ is zero.
MG thought it very easy and he had himself disdained to take the job. As a bystander, could you please help settle the problem and calculate the answer?