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