#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (a != 0 && b != 0) {
    if (a > b)
      a %= b;
    else
      b = b % a;
  }
  return a + b;
}
int main() {
  int n;
  cin >> n;
  int ans = 0;
  for (int i = (0); i < (n); i++) {
    int k, s = 0;
    cin >> k;
    s += k;
    cin >> k;
    s += k;
    cin >> k;
    s += k;
    if (s >= 2) ans++;
  }
  cout << ans << endl;
  return 0;
}
