#include <bits/stdc++.h>
int main() {
  int n, count = 0;
  scanf("%d", &n);
  while (n--) {
    int t = 3, s = 0;
    while (t--) {
      int a;
      scanf("%d", &a);
      s = s + a;
    }
    if (s > 1) {
      count++;
    }
  }
  printf("%d", count);
  return 0;
}
