#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, co = 0;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (a + b + c > 1) co++;
  }
  cout << co << endl;
}
