#include <stdio.h> int main() { int n = 0; int a = 0,b = 0,c = 0; int count=0; scanf("%d",&n); while (scanf("%d %d %d",&a,&b,&c)!=EOF) { if ((a+b+c)/3<60) { count++; } } printf("%d",count); return 0; }