I think this is only half of the problem!
However, researching, I found this problem:
N is a four-digit positive integer. Dividing N by 9 , the remainder is 5. Dividing N by 7, the remainder is 3. Dividing N by 5, the remainder is 4. What is the smallest possible value of N?
Is this the same problem? If so, here is the solution.