#include <bits/stdc++.h>
int main() {
  int n, i = 0, counter = 0;
  scanf("%d", &n);
  int Petya[n];
  int Vasya[n];
  int Tonya[n];
  while (i < n) {
    scanf("%d %d %d", &Petya[i], &Vasya[i], &Tonya[i]);
    if ((Petya[i] + Vasya[i] + Tonya[i]) >= 2) {
      counter++;
    }
    i++;
  }
  printf("%d", counter);
  return 0;
}
