Everyone in a class of 35 students takes math and history. 8 students received an A in history, \(16\) received an A in math and \(8\) received an A in both courses. How many students did not receive an A in either course?
35 - 8 - 16 + 8 = ____________