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