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