answer is -2
in case of counting semaphore
the value represented by semaphore tells--- the number of process that can enter into Critical Section
here the value was 3 so at max 3 process can enter and before entering they decrement counter and check if it
is less than 0.
and after that every process will wait in waiting queue and P is down operation or decrement on semaphore
eg--
current semaphore value V(3 )
process -- PR( )
V(3) --- PR(1) perforn down P ,checks if V() < 0, enter into CS
V(2) ---- PR(2) perforn down P,checks if V() < 0 , enter into CS
V(1) ---- PR(3) perforn down P,checks if V() < 0 , enter into CS
V(0) ---- PR(4) perform down P , checks if V()<0 and after down value isV(-1)
PR(4) Enter into waiting queue
V(-1) ------ PR(5) perform down P, checks if V()<0 and after down value isV(-2)
PR(5) enter into waiting queue
V(-2)
hence value is -2