How many positive integers N from 1 to 5000 satisfy both congruences N = 5 (mod 12) and N = 11 (mod 131)?
https://en.wikipedia.org/wiki/Chinese_remainder_theorem
Learn it first
1 = 797 2 = 2369 3 = 3941