#include <cstdio>
#include <stack>
#include <algorithm>
using namespace std;

class Point    {
public:
    int x, y;
    bool operator < (Point b) {
        if (y != b.y)
            return y < b.y;
        return x < b.x;
    }
};

Point pivot;

int ccw(Point a, Point b, Point c) {
    long long area = 1LL* (b.x - a.x) * (c.y - a.y) - 1LL* (b.y - a.y) * (c.x - a.x);
    if (area > 0)
        return -1;
    else if (area < 0)
        return 1;
    return 0;
}

long long int sqrDist(Point a, Point b)  {
    long long int dx = a.x - b.x, dy = a.y - b.y;
    return dx * dx + dy * dy;
}

bool POLAR_ORDER(Point a, Point b)  {
    int order = ccw(pivot, a, b);
    if (order == 0)
        return sqrDist(pivot, a) < sqrDist(pivot, b);
    return (order == -1);
}

int grahamScan(Point *points, int N)    {
    stack<Point> hull;
    if (N < 3)
        return N;
    int leastY = 0;
    for (int i = 1; i < N; i++)
        if (points[i] < points[leastY])
            leastY = i;
    Point temp = points[0];
    points[0] = points[leastY];
    points[leastY] = temp;
    pivot = points[0];
    sort(points + 1, points + N, POLAR_ORDER);

    hull.push(points[0]);
    hull.push(points[1]);
    hull.push(points[2]);

    for (int i = 3; i < N; i++) {
        Point top = hull.top();
        hull.pop();
        while (ccw(hull.top(), top, points[i]) != -1)   {
            top = hull.top();
            hull.pop();
        }
        hull.push(top);
        hull.push(points[i]);
    }
    return hull.size();
}
Point points[100100];
int main()  {
    int N;
	scanf("%d",&N);
	for(int i=0;i<N;i++)
		scanf("%d%d",&points[i].x,&points[i].y);
	printf("%d",3*N-grahamScan(points, N)*2-2);
    return 0;
}
