Suffix subset#5939

Suffix subset

1 second
256 megabytes
Very easy

You are given a set of strings s_1, s_2, \ldots, s_n.

Your task is to find a subset of these strings that satisfies the following conditions:

Your goal is to determine and output the number of strings in this subset.

Input

The first line contains an integer (1 \le n \le 10^5), representing the number of strings in the set. Each of the next lines contains a non-empty string s_i. All strings consist solely of lowercase Latin letters. The total length of all strings combined does not exceed 10^5.

Output

Output a single integer, which is the number of strings in the subset that meets the specified conditions.

Examples

Example 1

Loading
Loading