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