#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int arr[n][3];
  int count = 0;
  for (int i = 0; i < n; i++) {
    int one = 0;
    for (int j = 0; j < 3; j++) {
      cin >> arr[i][j];
      if (arr[i][j] == 1) {
        one++;
      }
    }
    if (one >= 2) {
      count++;
    }
  }
  cout << count << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
