#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[100010];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool cmp(pair<int, int> u, pair<int, int> v) {
  return (long long)u.first * v.second < (long long)u.second * v.first;
}
int main() {
  int n, m, i, a, b, d;
  scanf("%d ", &n);
  m = 0;
  for (i = 0; i < n; i++) {
    scanf("%d %d ", &a, &b);
    if (a == 0) continue;
    d = gcd(a, b);
    a /= d;
    b /= d;
    if (a > 0)
      b *= -1;
    else
      a *= -1;
    p[m++] = pair<int, int>(b, a);
  }
  sort(p, p + m, cmp);
  m = unique(p, p + m) - p;
  printf("%d\n", m);
  return 0;
}
