#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, m;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    if (a == 1 && b == 1 || a == 1 && c == 1 || b == 1 && c == 1) m++;
  }
  cout << m;
  return 0;
}
