#include <bits/stdc++.h>
using namespace std;
const int inf = 2000000000;
const long double eps = 1e-07;
int main() {
  int n;
  scanf("%d", &n);
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    int t = 0;
    for (int j = 0; j < 3; ++j) {
      int x;
      scanf("%d", &x);
      t += x;
    }
    if (t >= 2) ++ans;
  }
  cout << ans << endl;
  return 0;
}
