#include <bits/stdc++.h>
using namespace std;
struct Init {
  Init() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout.precision(20);
    cout << fixed;
  }
} init;
template <typename _Ty>
ostream& operator<<(ostream& ostr, const vector<_Ty>& v) {
  for (int i = 0; i < (int)v.size(); i++) {
    ostr << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return ostr;
}
template <typename _K, typename _V>
ostream& operator<<(ostream& ostr, const map<_K, _V>& v) {
  ostr << "{";
  for (auto iter = v.begin(); iter != v.end(); ++iter) {
    ostr << (*iter).first << ": " << (*iter).second << ", ";
  }
  ostr << "}";
  return ostr;
}
template <typename _K>
ostream& operator<<(ostream& ostr, const set<_K>& v) {
  for (auto iter = v.begin(); iter != v.end(); ++iter) {
    ostr << *iter << (iter != v.end() ? " " : "");
  }
  return ostr;
}
template <typename _K, typename _V>
ostream& operator<<(ostream& ostr, const pair<_K, _V>& v) {
  ostr << "(" << v.first << ", " << v.second << ")";
  return ostr;
}
long long powmod(long long n, long long count, long long mod) {
  if (count == 0) return 1;
  if (count % 2 == 0) {
    long long t = powmod(n, count / 2, mod);
    return t * t % mod;
  }
  return n * powmod(n, count - 1, mod) % mod;
}
long long ncr(long long n, long long r, long long mod) {
  long long a;
  if (n < r)
    a = min(n, r - n);
  else
    a = min(n - r, r);
  long long res = 1;
  for (int i = 0; i < a; i++) {
    res = res * (n - i) % mod;
    res = res * powmod(i + 1, mod - 2, mod) % mod;
  }
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<pair<long long, long long>> V(N);
  for (int i = 0; i < N; i++) {
    cin >> V[i].first >> V[i].second;
  }
  vector<pair<long long, long long>> p, m, z;
  for (int i = 0; i < N; i++) {
    if (V[i].first < 0 && V[i].second < 0) {
      p.push_back(V[i]);
    } else if (V[i].first > 0 && V[i].second > 0) {
      p.push_back(V[i]);
    } else if (V[i].first == 0 || V[i].second == 0) {
      z.push_back(V[i]);
    } else {
      m.push_back(V[i]);
    }
  }
  cout << N << endl;
}
