dragon

Dănuţ is passionate about modeling various types of wire. After modeling he names the shapes after Chinese mythological dragons, depending on their properties. He recently modeled the Lin-Iun dragon. Lin-Iun is the dragon always sleeping. Being in the shape of a simple polygon, it doesn't lie down to sleep, but sleeps vertically on the surface of the table it was built on.
In order to sleep, the dragon needs to be in a position where it's center of gravity is strictly between two contact points with the table surface. While sleeping the dragon doesn't change its position. The center of gravity is always at a lower point of the dragon and does not coincide with any polygon vertix.

Task

Write a program that determines the number of positions in which the Lin-Iun dragon can sleep.

Input Data

Input file dragon.in contains on the first line three positive integers separated by a space, N - the number of polygon vertices, xc and yc - the coordinates of the dragon's center of gravity. Each of the following N lines contains two positive integers, xi, yi, separated by a space - which are the coordinates (abscise and ordinate) of the polygon's vertices, in consecutive order.

Output Data

Output file dragon.out will contain a single line with the number of positions in which the Lin-Iun dragon can sleep in.

Restrictions

Example
dragon.in dragon.out

10 6 16
3 14
13 4
23 14
33 4
33 14
23 24
13 14
3 24
-7 14
-7 4

3

Time limit: 0.1 seconds/test

prof. Sergiu Corlat
Moldavian-Turkish High School, Chişinău, Republic of Moldova
Contact:scorlat@gmail.com