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