#include <bits/stdc++.h>
int main() {
  long long t, n, x, y, z, i, j, k, l, m, p, c;
  scanf("%lld", &n);
  t = 0;
  while (n--) {
    scanf("%lld", &x);
    scanf("%lld", &y);
    scanf("%lld", &z);
    c = x + y + z;
    if (c > 1) {
      t = t + 1;
    }
  }
  printf("%lld", t);
  return 0;
}
