Here operation $P$ decreases the value of counting semaphores, and operation $V$ increments the value of counting semaphores.
initial value of counting semaphore =$10$,
new value of CS after performing $5P,20P,2V,18P,5V10P,1V$ operations: $10-5-20+2-18+5-10+1=-35$