#include <bits/stdc++.h>
int main() {
  int n, count = 0;
  scanf("%d", &n);
  int a[n][3];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) scanf("%d", &a[i][j]);
  }
  for (int i = 0; i < n; i++) {
    int k = 0;
    for (int j = 0; j < 3; j++) k += a[i][j];
    if (k >= 2) count++;
  }
  printf("%d", count);
}
