#include <bits/stdc++.h>
using namespace std;
struct line {
  long long k, b;
};
bool cmp(line a, line b) { return double(a.b) / a.k > double(b.b) / b.k; }
int main() {
  int n;
  cin >> n;
  vector<line> v;
  for (int i = 0; i < n; i++) {
    line t;
    cin >> t.k >> t.b;
    if (t.k) v.push_back(t);
  }
  n = v.size();
  sort(v.begin(), v.end(), cmp);
  int sum = 0;
  for (int i = 0; i < n; i++)
    if (i == n - 1 || v[i].b * v[i + 1].k != v[i + 1].b * v[i].k) sum++;
  cout << sum << endl;
  return 0;
}
