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