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