#include <bits/stdc++.h>
using namespace std;
int main() {
  int np, p, v, t, sol = 0;
  cin >> np;
  for (int i = 0; i < np; i++) {
    cin >> p;
    cin >> v;
    cin >> t;
    int count = p + v + t;
    if (count >= 2) {
      sol++;
    }
  }
  cout << sol;
}
