Option B

since P(S) decreases the counting semaphore value

The initial value of semaphore is 7

After finishing 20 P operations S=-13 (i.e 7-20 =-13)

Now S=-13

V(S) increases the counting semaphore value

After finishing 15 V operations S=-13+15=2

Therefore Answer is 2 option B