import java.io.*;
import java.util.*;

public class typewriter_pk_wa {

	void solve() throws IOException {
		int n = nextInt();
		String s = nextToken();
		int ans = s.length();
		for (int i = 1; i < n; i++) {
			String t =  nextToken();
			ans = ans + Math.min(t.length(), (t.length()  + s.length() - 2 * lcp(s, t) + 1));
			//s = t;
		}
		out.println(ans + n - 1);
	}

	private int lcp(String s, String t) {
		for (int i = 0; i < Math.min(s.length(), t.length()); i++) {
			if (s.charAt(i) != t.charAt(i))
				return i;
		}
		return Math.min(s.length(), t.length());
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;

	void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			br = new BufferedReader(
					new FileReader(new File("typewriter.in")));
			out = new PrintWriter("typewriter.out");

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new typewriter_pk_wa().run();
	}

	String nextToken() throws IOException {
		while ((st == null) || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}
}
