Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

B. Baus Stream
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Baus, the top laner of Los Ratones, is legendary for his Sion strategy: equipping Ghost and Teleport, ignoring every enemy on the map, and running in a straight line toward the enemy Nexus. The champion dies on impact, but the passive keeps him rolling, dealing massive damage to structures even in death. It is chaotic, it is reckless, and it works.

When Baus announced a dedicated Sion stream, the Los Ratones community went wild. Thousands of viewers flooded the channel, filling the chat with messages. Bastian and Franchesco, the team's two most dedicated fans and self-appointed chat moderators, recorded the username of every viewer who sent at least one message during the stream. All usernames in the registry are distinct.

After the stream, they realized the list had grown too large to manage. They agreed it needed to be trimmed by exactly $$$k$$$ usernames enough to keep it under control, but no more, since every extra deletion risks removing a genuine fan. The only moderation tool at their disposal works as follows: given a search string $$$t$$$, the system displays all usernames that begin with $$$t$$$, and a single confirmation removes every username shown in those results.

Bastian and Franchesco need to choose which $$$k$$$ usernames to remove and execute the deletions using as few searches as possible. Can you help them?

Input

The first line contains two integers $$$n$$$ and $$$k$$$ ($$$2 \le n \le 10^4$$$, $$$1 \le k \lt n$$$), the number of usernames in the registry and the number of usernames to remove.

The next $$$n$$$ lines each contain one username consisting of lowercase English letters. All usernames are distinct. The sum of the lengths of all usernames does not exceed $$$10^5$$$.

Output

Print a single integer. The minimum number of search operations needed to remove exactly $$$k$$$ usernames from the registry.

Examples
Input
5 2
sion
sionfan
sionbot
run
runner
Output
1
Input
5 4
sion
sionfan
sionbot
run
runner
Output
2