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