#include<iostream>
#include<vector>
#include<cstdio>
#include<algorithm>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define inf (1<<29)
#define MAX 16
using namespace std;

int n;
int cost[MAX][MAX];
string s[MAX];
int dp[1<<MAX][MAX];

int getCost(string a,string b)
{//from a to b
  int res = inf;
  for(int i=a.size()-1,st = 0;i>=0 && st < b.size();i--,st++)
    {
      string ca = a.substr(i,a.size()-i);      
      string cb = b.substr(0,st+1);
      if(ca == cb)res = st+1; 
    }
  return res;
}

int main()
{
  while(1)
    {
      scanf("%d",&n);
      if(n == 0)break;
      rep(i,n)rep(j,n)cost[i][j] = inf;
      rep(i,n)cin >> s[i];
      vector<string> ss;
      rep(i,n)
	{
	  bool contain = false;
	  rep(j,n)
	    {
	      if(i == j)continue;
	      if(s[j].find(s[i]) != string::npos)
		{

		  contain = true;
		  break;
		}
	    }
	  if(!contain)ss.push_back(s[i]);
	}

      n = ss.size();
      rep(i,n)
	{
	  rep(j,n)
	    {
	      if(i == j)
		{
		  cost[i][j] = ss[i].size();
		  continue;
		}
	      int ct = getCost(ss[i],ss[j]);
	      if(ct == inf)cost[i][j] = ss[j].size();
	      else cost[i][j] = ss[j].size() - ct;
	    }
	}
      rep(i,1<<n)rep(j,n)dp[i][j] = inf;
      rep(i,n)dp[1<<i][i] = ss[i].length();

      rep(S,(1<<n))
	{
	  rep(from,n)
	    {
	      if(!((S>>from) & 1))continue;
	      rep(to,n)
		{
		  if((S>>to) & 1)continue;
		  dp[S|(1<<to)][to] = min(dp[S|(1<<to)][to],
					  dp[S][from] + cost[from][to]);
		}
	    }
	}
      int ans = inf;
      rep(i,n)ans = min(ans,dp[(1<<n)-1][i]);

      cout << ans << endl;
    }
  return 0;
}