Stormy Versailles

At the end of 1999, France was confronted by a huge storm which destroyed many parts of our forests. One of the most emblematic was the park of the Versailles palace, where hundreds of old trees fell. It took much effort to clean up fallen trees. At the time, the age of the trees was reevaluated. The method used was to count the number of rings appearing in each tree’s cross-section. The more rings, the older the tree is. To speed up the job, pictures of all trees were taken. Now, your work is to process the pictures and deduce the age of the trees. The input for your program is a list of some points present in rings. The rings are no longer available, but you can reconstruct them by computing a series of convex hulls. To find a first ring, you can compute the convex hull of all points. Then, to find the next ring, you can remove those points on the hull and compute the convex hull of the remaining points, and so on. When there are no points left, the age of the tree is given by the number of hulls found. Let us consider Example 1: Here, there is just one ring: Example 2 is more intricate: The rings are:

2/2 Hence the age is 3. Input The input file consists of several test cases. Each of them contains lines of integers. The first line contains one integer, the number n of points of the sample (1 ≤ n ≤ 3000). The next n lines each contains two integers, the abscissa xi and ordinate yi of the point. All points are pairwise distinct and have coordinates in -50000..50000. Output For each test case of input, the output file will consist of one line containing one integer, the age of the tree. Sample Input 4 00 10 11 01 9 00 03 50 55 05 11 13 41 22 Output 1 3