#include <bits/stdc++.h>
using namespace std;
int a[3005][3005];
int main() {
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    int sum = 0;
    for (int j = 1; j <= 3; j++) {
      cin >> a[i][j];
      sum += a[i][j];
    }
    if (sum >= 2) ++cnt;
  }
  cout << cnt;
  return 0;
}
