#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;

template<class T> inline void chmin(T& a, const T& b) { if(b < a) a = b; }

constexpr int MAX_N = 14;
constexpr int INF = 0xfffffff;
vector<string> cities;

int n;
int dp[MAX_N][MAX_N];
int memo[MAX_N][(1 << MAX_N)];

int connect(int front, int back) {
	if(dp[front][back] != -1) return dp[front][back];
	const int f_length = static_cast<int>(cities[front].size());
	const int b_length = static_cast<int>(cities[back].size());

	for(int i = min(f_length, b_length); i > 0; --i) {
		if(cities[front].substr(f_length - i) == cities[back].substr(0, i)) {
			return dp[front][back] = b_length - i;
		}
	}

	return dp[front][back] = b_length;
}

int dfs(int idx, int used) {
	if(memo[idx][used] != -1) return memo[idx][used];
	if(used == (1 << n) - 1) return memo[idx][used] = 0;

	int res = INF;
	for(int i = 0; i < n; ++i) {
		if(used & (1 << i)) continue;
		chmin(res, dfs(i, (used | (1 << i))) + connect(idx, i));
	}

	return memo[idx][used] = res;
}

void init() {
	for(int i = 0; i < n;) {
		for(int j = 0; j < n; ++j) {
			if(i == j) continue;

			if(cities[j].find(cities[i]) != string::npos) {
				cities.erase(cities.begin() + i);
				--n;
				goto next;
			}
		}
		++i;
	next:;
	}
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(cin >> n && n) {
		cities.clear();
		cities.resize(n);
		for(int i = 0; i < n; ++i) {
			cin >> cities[i];
		}

		init();

		memset(memo, -1, sizeof(memo));
		memset(dp, -1, sizeof(dp));

		int ans = INF;
		for(int i = 0; i < n; ++i) {
			chmin<int>(ans, cities[i].size() + dfs(i, (1 << i)));
		}

		cout << ans << endl;
	}

	return EXIT_SUCCESS;
}