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