The programming competition
Vova conducts programming competitions and trainings in his school. To do this, he downloaded from Internet a lot of archives with programming competitions and trainings. He unpacked everything he downloaded to the hard drive of his computer, and now can not make out with the resulting set of files. Vova wants to understand how many descriptions of programming competitions he downloaded.
The pair of files is called test, if they are situated in one directory and their full names have the form "XY" or "XY.a", where "XY" is the test case number (supplemented with a leading zero if it is less than ten). The first of these files contains the input data, the second contains the answer.
The directory is called a directory with tests, if it contains tests with all numbers from 1 to N, where 1 ≤ N ≤ 99, and no other files (but there can be sub-directories).
The directory is called a problem, if it contains the file with name "check" and any (possibly empty) extension and a sub-directory "tests", which is a directory with tests. The directory with a problem can additionally contain other files and sub-directories.
The directory is called the contest description, if it contains at least one sub-directory, and all its sub-directories are problems.
You are given the description of all files stored on a hard drive in Vova's computer. Find out, how many contest descriptions are kept on a hard drive.
Input
The first line contains the number of files n (1 ≤ n ≤ 1000). Each of the next n lines contains the full path to the file. Each line contains from 1 to 200 characters.
The path elements are separated with characters "\". At the beginning of the path there is a letter of the drive (from "A" to "Z"), then colon and "\". The directory names in the path and the file names consist of characters with codes from 33 to 126, except for the character "\". The last element of the path is a full file name. The full file name contains no more than one point. There is at least one character before and after the point. If the file name contains the point, the part of its name after the point is called extension, and the part before the point is called the file name. Otherwise, it is considered that a file has an empty extension, and the file name coincides with its full name.
The lowercase and uppercase letters in path do not differ. No directory contains the file and sub-directory with the same name.
Output
Print the number of contest descriptions in the given set of files.
Sample of input and output data