#include <bits/stdc++.h>
int main() {
  int n, count, a, b, c, i;
  while (~scanf("%d", &n)) {
    count = 0;
    for (i = 0; i < n; i++) {
      scanf("%d%d%d", &a, &b, &c);
      if (a && b || a && c || b && c) count++;
    }
    printf("%d\n", count);
  }
  return 0;
}
