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