#include <bits/stdc++.h>
int n, arr[1005][3], sum, cnt;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    scanf("%d %d %d", &arr[i][0], &arr[i][1], &arr[i][2]);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) sum += arr[i][j];
    if (sum >= 2) cnt++;
    sum = 0;
  }
  printf("%d", cnt);
  return 0;
}
