#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main()
{
int n;
cin >> n;
int cnt = 0;
for(int i = 1; i <= n; i++){
int p1, p2, p3;
cin >> p1 >> p2 >> p3;
if(p1 + p2 + p3 >= 2){
cnt++;
}
}
//
cout << cnt << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlIDxjbWF0aD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKCgogICAgaW50IG47CiAgICBjaW4gPj4gbjsKCiAgICBpbnQgY250ID0gMDsKICAgIAogICAgZm9yKGludCBpID0gMTsgaSA8PSBuOyBpKyspewogICAgICAgICAgaW50IHAxLCBwMiwgcDM7CiAgICAgICAgICBjaW4gPj4gcDEgPj4gcDIgPj4gcDM7CgogICAgICAgICAgaWYocDEgKyBwMiArIHAzID49IDIpewogICAgICAgICAgICAgICAgICAgIGNudCsrOwogICAgICAgICAgfQogICAgfQoKICAgIC8vIAogICAgY291dCA8PCBjbnQgPDwgIlxuIjsKCiAgICByZXR1cm4gMDsKfQo=