Many databases store the data in the character fields (and especially indices) using
prefix compression. This technique compresses a sequence of strings
A_{1}, ..., A_{N} by
the following method: if there are strings
A_{i} =
a_{i,1}a_{i,2}...a_{i,p}
and
A_{i + 1} =
a_{i+1,1}a_{i+1,2}...a_{i+1,q}

such that for some j ≤ min(p, q)
a_{i,1} = a_{i+1,1},
a_{i,2} = a_{i+1,2}, ...
a_{i,j} = a_{i+1,j},
then the second string is stored as
[j]a_{i+1,j+1}a_{i+1,j+2}...
a_{i+1,q}, where [j] is a single character with code j.

If j = 0, that is, strings do not have any common prefix, then the second
string is prefixed with zero byte, and so the total length actually increases.

Input file format

First line of input file contains integer number N, with following
N lines containing strings A_{1} ... A_{N}

Output file format

Output file must contain a single integer — minimal total length of
compressed strings.