#include <bits/stdc++.h>
using namespace std;
int main() {
  int c, x, y, z, count = 0;
  cin >> c;
  while (c--) {
    cin >> x >> y >> z;
    if ((x == 1 && y == 1) || (y == 1 && z == 1) || (x == 1 && z == 1)) {
      count++;
    }
  }
  cout << count << endl;
  return 0;
}
