Given the task definition and input, reply with output. The task is to generate the correct answer for a given math problem.

Problem: of 30 applicants for a job , 9 had at least 4 years ' experience , 18 had degrees , and 3 had less than 4 years ' experience and did not have a degree . how many of the applicants had at least 4 years ' experience and a degree ?
10