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