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