#include <bits/stdc++.h>
using namespace std;
int n, d[1005][3];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  int nr = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= 3; j++) {
      cin >> d[i][j];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (d[i][1] + d[i][2] + d[i][3] >= 2) nr++;
  }
  cout << nr;
  return 0;
}
