#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, a, b, c, i, count = 0;
  cin >> T;
  for (i = 0; i < T; i++) {
    cin >> a >> b >> c;
    if ((a + b + c) >= 2) {
      count++;
    }
  }
  cout << count << "\n";
  return 0;
}
