#include <bits/stdc++.h>
using namespace std;
const int N = 2 + 6;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  int cnt = 0;
  while (n--) {
    int tmp = 0;
    int x;
    cin >> x;
    if (x == 1) tmp++;
    cin >> x;
    if (x == 1) tmp++;
    cin >> x;
    if (x == 1) tmp++;
    if (tmp > 1) cnt++;
  }
  cout << cnt;
  return 0;
}
