#include <cmath>
#include <vector>
#include <iostream>
using namespace std;

int dp[14][1<<14];
int INF = 1000000000;
int n;

bool contained(string a, string b){
  if(a.length() > b.length()) return false;
  for(int i = 0; i <= b.length()-a.length(); ++i){
    bool f = true;
    for(int j = 0; j < a.length(); ++j){
      if(a[j] != b[i+j]){
        f = false;
        break;
      }
    }
    if(f) return true;
  }
  return false;
}

int match(string a, string b){
  int ret = 0;
  for(int i = 1; i < a.length(); ++i){
    bool f = true;
    for(int j = 0; j < i; ++j){
      if(b[b.length()-i+j] != a[j]){
        f = false;
        break;
      }
    }
    if(f) ret = max(ret,i);
  }
  //cout << a << " " << b << " " << ret << endl;
  return ret;
}

int memo_dp(int i, int bit, vector<string> &names){
  if(dp[i][bit] < INF){
    return dp[i][bit];
  }
  int bit_ = bit - (1<<i);
  for(int j = 0; j < n; ++j){
    if((bit_>>j)&1){
      dp[i][bit] = min(dp[i][bit],memo_dp(j,bit_,names)+(int)names[i].length()-match(names[i],names[j]));
    }
  }
  //cout << i << " " << bit << " " << dp[i][bit] << endl;
  return dp[i][bit];
}

int main(){
  while(cin >> n, n){
    vector<string> cities(n);
   
    for(int i = 0; i < n; ++i){
      cin >> cities[i];
    }

    vector<string> names;
    for(int i = 0; i < n; ++i){
      bool f = true;
      for(int j = 0; j < n; ++j){
        if(i == j) continue;
        if(contained(cities[i],cities[j])){
          f = false;
          break;
        }
      }
      if(f) names.push_back(cities[i]);
    }

    n = names.size();
    for(int i = 0; i < n; ++i){
      for(int j = 0; j < (1<<n); ++j) dp[i][j] = INF;
    }

    for(int i = 0; i < n; ++i)
      dp[i][(1<<i)] = (int)names[i].length();
    
    int ans = INF;
    for(int i = 0; i < n; ++i){
      ans = min(memo_dp(i, (1<<n)-1, names), ans);
    }
    cout << ans << endl;
  }
  return 0;
}