include <iostream> using namespace std; int main() { int n,b,c,ge,shi,bai,qian; cin>>n; int a[n]; for(int i = 0;i<n;i++){ cin>>b; ge = b%1000%100%10; shi = b%1000%100/10; bai = b%1000/100; qian = b/1000; if(ge-qian-bai-shi>0){ c++; } } cout<<c; return 0; }