#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
const int N = 1E5 + 10;
ll stk[N];
ll top;
ll x[N], y[N];
bool check(ll a, ll b, ll c) {
return ((y[a] - y[b]) * (x[a] - x[c]) <= (y[a] - y[c]) * (x[a] - x[b]));
}
int main() {
int n;
cin >> n;
set<ll> res;
for (int i = 1; i <= n; i++) {
cin >> x[i] >> y[i];
if (top >= 1) {
while (top >= 2 && check(i, stk[top], stk[top - 1])) top--;
res.insert(stk[top]);
}
stk[++top] = i;
}
ll cnt = res.size();
if (res.count(1)) cnt--;
cout << cnt << "\n";
return 0;
}