Vova conducts programming competitions and training sessions at his school. To do this, he downloaded many archives of various programming competitions and training camps from the Internet. He unpacked everything he downloaded onto his computer's hard drive and now cannot make sense of the resulting set of files. Vova wants to find out how many descriptions of programming competitions he downloaded.
A pair of files is called a test if they are located in the same directory and their full names have the forms "XY" and "XY.a", where "XY" is the test's number (with a leading zero if it is less than ten). The first of these files contains the input data, and the second contains the sample output.
A directory is called a directory with tests if it contains all tests numbered from to , where 1 \leq N \leq 99, and no other files (subdirectories may exist).
A directory is called a problem if it contains a file with the name "check" and any (possibly empty) extension, and a subdirectory "tests", which must be a directory with tests. The problem directory may also contain other files and subdirectories.
A directory is called a contest description if it contains at least one subdirectory, and all its subdirectories are problems.
You are given a description of all files stored on Vova's hard drive. Find out how many contest descriptions are present on the hard drive.
The first line contains the number of files (1 \leq n \leq 1000). Each of the following lines contains the full path to a file. Each line contains from to characters.
The path elements are separated by the character "\". At the beginning of the path there is the drive letter (from "A" to "Z"), then a colon, then a "\". Directory names and file names in the path consist of characters with codes from to , except for the character "\". The last element of the path is the full file name. The full file name contains no more than one dot; in that case, there is at least one character before and after the dot. If the file name contains a dot, the part after the dot is called the extension, and the part before the dot is the file name itself. Otherwise, it is considered that the file has an empty extension, and the file name matches its full name.
Lowercase and uppercase letters in the paths are not distinguished. No directory contains a file and a subdirectory with the same name.
Print the number of contest descriptions in the described set of files.

Example 1