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