CF172A Phone Code

Description

Polycarpus has $ n $ friends in Tarasov city. Polycarpus knows phone numbers of all his friends: they are strings $ s_{1},s_{2},...,s_{n} $ . All these strings consist only of digits and have the same length. Once Polycarpus needed to figure out Tarasov city phone code. He assumed that the phone code of the city is the longest common prefix of all phone numbers of his friends. In other words, it is the longest string $ c $ which is a prefix (the beginning) of each $ s_{i} $ for all $ i $ ( $ 1

Input Format

The first line of the input contains an integer $ n $ ( $ 2

Output Format

Print the number of digits in the city phone code.

Explanation/Hint

A prefix of string $ t $ is a string that is obtained by deleting zero or more digits from the end of string $ t $ . For example, string "00209" has 6 prefixes: "" (an empty prefix), "0", "00", "002", "0020", "00209". In the first sample the city phone code is string "00". In the second sample the city phone code is an empty string. In the third sample the city phone code is string "770123456789".