#include <iostream> using namespace std; #define maxSize 10 int main() { int views[maxSize]; int n, res; while(cin>>n) { res=0; for(int i=0; i<n; ++i) { for(int j=0; j<3; ++j) cin>>views[j]; if((views[0]+views[1]+views[2])>1) ++res; } cout<<res<<endl; } return 0; }