#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int arr[3];
  long long int max = 0;
  while (n--) {
    long long int count = 0;
    for (long long int i = 0; i < 3; i++) {
      cin >> arr[i];
    }
    for (long long int i = 0; i < 3; i++) {
      if (arr[i] > 0) {
        count++;
      }
    }
    if (count >= 2) {
      max++;
    }
  }
  cout << max;
  return 0;
}
