#include <bits/stdc++.h>
using namespace std;
struct node {
  long long k, b;
} a[100005], tmp;
bool operator<(const node& l, const node& r) {
  return (-l.b) * r.k < l.k * (-r.b);
}
bool operator!=(const node& l, const node& r) { return l.b * r.k != l.k * r.b; }
int main() {
  int n;
  long long k, b;
  while (~scanf("%d", &n)) {
    int num = 0;
    for (int i = 0; i < n; i++) {
      scanf("%I64d%I64d", &k, &b);
      if (k < 0) {
        k = -k;
        b = -b;
      }
      if (k) {
        a[num].k = k;
        a[num].b = b;
        num++;
      }
    }
    if (num == 0) {
      printf("0\n");
      continue;
    }
    sort(a, a + num);
    int ans = 1;
    tmp = a[0];
    for (int i = 1; i < num; i++)
      if (a[i] != tmp) {
        tmp = a[i];
        ans++;
      }
    printf("%d\n", ans);
  }
  return 0;
}
