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