#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int it = 5;
int in[3], count=0;
while (it-- > 0) {
cin >> in[0] >> in[1] >> in[2];
sort(in, in + 3);
if (in[0] + in[1] > in[2])
count++;
}
cout << count;
return 0;
}