#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0;
  cin >> n;
  while (n--) {
    int a, b, c, d = 0, e = 0, f = 0;
    cin >> a >> b >> c;
    if (a + b == 2) {
      d += 1;
    }
    if (b + c == 2) {
      e += 1;
    }
    if (a + c == 2) {
      f += 1;
    }
    if (d + e + f > 0) {
      sum += 1;
    }
  }
  cout << sum;
}
