From the given 140 students, all even numbered students opted Mathematics (M), hence, the number of students opted Mathematics is M≡[2140]=70, where [x] denotes the greatest integer function of x.
Similarly, the students who opted Physics are P≡[3140]=46
And, the students who opted Chemistry are C≡[5140]=28
Similarly, the students who opted Mathematics and Physics are the numbers which are divisible by both 2&3 i.e. 6, and their number is [6140]=23
The students who opted Mathematics and Chemistry are the numbers which are divisible by both 2&5 i.e. 10, and their number is [10140]=14
The students who opted Physics and Chemistry are the numbers which are divisible by both 3&5 i.e. 15, and their number is [15140]=9
And, the students who opted all the three subjects are the numbers which are divisible by 2,3&5 i.e. 30, and their number is [30140]=4

Now, using
n(P∪C∪M)=n(P)+n(C)+n(M)−n(P∩C)−n(C∩M)−n(M∩P)+n(P∩M∩C)
=46+28+70−9−14−23+4
=102
Thus, 102 students have opted for atleast one of the three subjects.
Hence, number of students who did not opt for any of the three courses =140−102=38.