#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  int sum, c = 0;
  cin >> n;
  int arr[3];
  for (int i = 0; i < n; i++) {
    for (int i = 0; i < 3; i++) {
      cin >> arr[i];
    }
    sum = arr[0] + arr[1] + arr[2];
    if (sum > 1) c++;
  }
  cout << c;
  return 0;
}
