#include <bits/stdc++.h>
using namespace std;
string a[303];
int sum[303];
int n, len, ans;
bool ok(int s1, int e1, int s2) {
  while (s1 <= e1) {
    if (a[s1] != a[s2]) return false;
    s1++, s2++;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    len += a[i].size() + 1;
    sum[i] = sum[i - 1] + a[i].size();
  }
  ans = --len;
  for (int i = 1; i <= n; i++) {
    for (int l = 1; l <= n / 2; l++) {
      int diu = sum[i + l - 1] - sum[i - 1] - 1;
      int last = 1, js = diu;
      bool f = 0;
      for (int s2 = i + l; s2 + l - 1 <= n;) {
        if (ok(i, i + l - 1, s2)) {
          s2 += l;
          js += diu;
          f = 1;
        } else
          s2++;
      }
      if (f) ans = min(ans, len - js);
    }
  }
  cout << ans << endl;
  return 0;
}
