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