#include <bits/stdc++.h>
using namespace std;
int main() {
  int res = 0, n, c1, c2, c3, c;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> c1 >> c2 >> c3;
    c = 0;
    if (c1 == 1) c++;
    if (c2 == 1) c++;
    if (c3 == 1) c++;
    if (c >= 2) res++;
  }
  cout << res;
  return 0;
}
