#!/usr/bin/perl -w

use strict;

$/ = "\n\n";

my $valid = 0;
while (<>) {
	$valid++ if (
		grep { /^(?:byr|iyr|eyr|hgt|hcl|ecl|pid):/ }
		split /\s+/
	) == 7;
}

print "Valid: $valid\n";

