//I615
//Pál Benedek József 12.C
//Szeged
//Szegedi Radnóti Miklós Kísérleti Gimnázium

#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>

using namespace std;

struct Pont {
    int x, y;
};
int tavNegyzet(const Pont& p1, const Pont& p2) {
    return (p2.x - p1.x) * (p2.x - p1.x) + (p2.y - p1.y) * (p2.y - p1.y);
}

int orientacio(const Pont& p1, const Pont& p2, const Pont& p3) {
    int o = (p2.y - p1.y) * (p3.x - p2.x) - (p3.y - p2.y) * (p2.x - p1.x);
    if (o == 0) return 0;
    return (o > 0) ? 1 : 2;
}
vector<Pont> grahamScan(vector<Pont>& pontok) {
    int n = pontok.size();
    if (n < 3) return vector<Pont>();

    int minIndex = 0;
    for (int i = 1; i < n; i++) {
        if (pontok[i].y < pontok[minIndex].y || (pontok[i].y == pontok[minIndex].y && pontok[i].x < pontok[minIndex].x)) {
            minIndex = i;
        }
    }
    swap(pontok[0], pontok[minIndex]);

    sort(pontok.begin() + 1, pontok.end(), [&](const Pont& p1, const Pont& p2) {
        int o = orientacio(pontok[0], p1, p2);
        if (o == 0) {
            return tavNegyzet(pontok[0], p1) < tavNegyzet(pontok[0], p2);
        }
        return (o == 2);
    });
    
    stack<Pont> verem;
    verem.push(pontok[0]);
    verem.push(pontok[1]);
    for (int i = 2; i < n; i++) {
        while (verem.size() > 1) {
            Pont p1 = verem.top();
            verem.pop();
            Pont p2 = verem.top();
            if (orientacio(p2, p1, pontok[i]) == 2) {
                verem.push(p1);
                break;
            }
        }
        verem.push(pontok[i]);
    }

    vector<Pont> konvexBuro;
    while (!verem.empty()) {
        konvexBuro.push_back(verem.top());
        verem.pop();
    }
    return konvexBuro;
}

int main() {
    int N;
    cin >> N;

    vector<Pont> pontok(N);
    for (int i = 0; i < N; ++i) {
        cin >> pontok[i].x >> pontok[i].y;
    }

    vector<Pont> buroCsucsok = grahamScan(pontok);

    cout << buroCsucsok.size() << endl;

    return 0;
}
