The new streetcars can carry ~251~ people, compared to the old streetcars, which only carried ~132~ people. Given an old streetcar route with the number of passengers waiting at each stop and the percentage of riders that get off, determine the number of streetcars that could be saved by using the newer ones instead.
Your goal is to determine the number of streetcars required to pick up all the passengers, with streetcars running from the first to the last stop.
Assume that if a streetcar is full the remaining passengers will wait for the next one, that no one gets off at the stop they get on, and that passengers will always board the first streetcar that has space.
The first line will consist of ~S~ ~(1 \le S \le 100\,000)~, the number of stops.
The next ~S~ lines contain two space-separated integers, ~N~ and ~P~.
~N~ ~(0 \le N \le 5\,000)~ represents the number of passengers waiting at the stop.
~P~ ~(0 \le P \le 100)~ represents the percentage of passengers on the streetcar that get off at that stop.
When calculating the number of passengers that get off, round to the lowest integer.
The output should consist of the number of streetcars saved by using the new ones instead of the old ones.
3 30 0 50 10 70 5
Explanation of Output for Sample Input
Upon reaching the second stop the streetcar has ~30~ passengers. ~10\%~ get off and then ~50~ board, leaving it with ~77~ passengers. At the third stop, only ~5\%~ get off, leaving space for only ~132-74=58~ more passengers. This means that ~12~ passengers will have to wait for the next streetcar, but with the new streetcar, there would have been room for ~251-74=177~ more passengers, meaning that only one would have been required.