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