#include <bits/stdc++.h>
int main() {
  int i, n, m = 0, dem = 0, j, mang1[1000][3];
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    for (j = 0; j < 3; j++) scanf("%d", &mang1[i][j]);
  for (i = 0; i < n; i++) {
    for (j = 0; j < 3; j++) {
      m += mang1[i][j];
    }
    if (m >= 2) dem++;
    m = 0;
  }
  printf("%d", dem);
}
