#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, count = 0;
  cin >> n;
  while (n--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (a + b + c >= 2) count++;
  }
  cout << count << "\n";
}
