#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
int n;
struct frac {
  int x, y;
};
vector<frac> v;
bool comp(frac &a, frac &b) { return 1LL * a.y * b.x < 1LL * a.x * b.y; }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (x != 0) {
      frac f;
      if (x > 0)
        f.x = x, f.y = -y;
      else
        f.x = -x, f.y = y;
      v.push_back(f);
    }
  }
  int ans = 0;
  sort(v.begin(), v.end(), comp);
  for (int i = 0; i < v.size(); i++) {
    if (i == 0 || comp(v[i - 1], v[i])) ans++;
  }
  cout << ans << endl;
  return 0;
}
