#include <bits/stdc++.h>
int main() {
  int n, x, k, r, y;
  scanf("%d", &n);
  y = 0;
  while (n > 0) {
    k = 0;
    r = 3;
    while (r > 0) {
      scanf("%d", &x);
      if (x > 0) {
        k++;
      }
      r--;
    }
    if (k >= 2) {
      y++;
    }
    n--;
  }
  printf("%d", y);
  return 0;
}
