#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int total = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int sol[3];
    cin >> sol[0] >> sol[1] >> sol[2];
    if (sol[0] + sol[1] + sol[2] >= 2) {
      total++;
    }
  }
  cout << total;
}
