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