#include <stdio.h>
int main()
{
    int n, a, b, c, sum, success;
    char temp; // temp statement to clear buffer!!!!!!
    scanf("%d", &n);
    int i = 0;
    success = 0;
    int z = n;
    while (i < z)
    {
        char str[] = "";
        scanf("%c",&temp); // temp statement to clear buffer!!!!!!
        scanf("%[^\n]", str);
        a = str[0] - '0';
        b = str[2] - '0';
        c = str[4] - '0';
        sum = a + b + c;
        if (sum >= 2)
        {
            success++;
        }
        i++;
    }
	printf("%d\n\n", success);
    return 0;
}