#!/usr/bin/perl -w

use strict;
use v5.30;

my $valid;
my @d;
while (<>) {
	chomp;
	push @d, [ /(\d+)/g ];
	if (@d == 3) {
		for my $c (0 .. 2) {
			my @t = sort { $a <=> $b } ($d[0][$c], $d[1][$c], $d[2][$c]);
			$valid++ if $t[0]+$t[1] > $t[2];
		}
		@d = ();
	}
}

say $valid;
