#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  int result = 0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int ab;
    for (int b = 0; b < 3; b++) {
      std::cin >> ab;
      sum = sum + ab;
    }
    if (sum > 1) {
      result = result + 1;
    }
    sum = 0;
  }
  std::cout << result;
}
