#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void _read(T& x) {
  char ch = getchar();
  bool sign = true;
  while (!isdigit(ch)) {
    if (ch == '-') sign = false;
    ch = getchar();
  }
  for (x = 0; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
  if (!sign) x = -x;
}
int n, ans, ori;
string s[305];
int len[305];
int main() {
  int i, j, k, l;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> s[i];
    len[i] = s[i].length();
    ans += len[i];
  }
  ans += n - 1;
  ori = ans;
  for (i = 1; i <= n; i++) {
    int Len = 0;
    for (j = i; j <= n; j++) {
      Len += s[j].length();
      int sum = 0;
      for (k = j + 1; k <= n; k++) {
        if (k + j - i > n) break;
        for (l = k; l <= k + j - i; l++) {
          if (s[l] != s[l - k + i]) break;
        }
        if (l == k + j - i + 1) {
          sum++;
          k = k + j - i;
        }
      }
      if (sum > 0) {
        ans =
            min(ans, ori - (sum + 1) * (Len - j + i - 1) - (sum + 1) * (j - i));
      }
    }
  }
  cout << ans;
}
