#include <bits/stdc++.h>
using namespace std;
int main() {
  int num, counter = 0, x, y, z;
  cin >> num;
  for (int i = 1; i <= num; i++) {
    cin >> x >> y >> z;
    if (x + y + z >= 2) {
      counter++;
    }
  }
  cout << counter;
  return 0;
}
