In the event of technical difficulties with Szkopuł, please contact us via email at email@example.com.
If you are familiar with IRC chat, the support team is also reachable on PIRC network (
#szkopul channel. If you are not, just use email.
Please do not ask us things like "how to solve task XYZ?".
Please remember that the support team has to sleep sometimes or go to work in real life.
In the middle of the Hundred Acre Wood there is a huge oak. Squirrel Barbara lives in one of this oak's hollows. Each day she walks along the forest in a quite unusual way. She starts her walk near the oak, facing North, and in each unit of time she performs a move in the following way:
The first line of the input contains one integer (), the number of nuts that were lying on the ground at time 0. The following lines describe the nuts' locations: each of them contains two integers and (), separated by a single space. Such a line means that the nut lies meters to the East and meters to the South from the oak. You can assume that no two nuts lie in the same location. The last line of input contains one integer (), the number of units of time that passed since Barbara started her walk.
The first and only line of the output should contain one non-negative integer, the number of nuts that are lying on the ground after units of time. We assume that Barbara has an unlimited number of nuts.
For the input data:
2 0 0 -2 1 8
the correct result is:
Task author: Tomasz Idziaszek.