#include <bits/stdc++.h>
using namespace std;
int main() {
  int num;
  int a, b, c;
  int count = 0;
  cin >> num;
  while (num--) {
    cin >> a >> b >> c;
    if (a + b + c >= 2) count++;
  }
  cout << count;
  return 0;
}
