#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
string s;
int p[46], q[15], ans; bool b;
signed main() {
	cin >> s >> s;
	for (int i = 0; i < s.size(); i += 2)p[s[i] - 'a']++;
	for (int i = 0; i < 26; i++)q[p[i]]++;
	if (q[1]) { ans = q[1] * 2 - 1; b = 1; }
	for (int i = 2; i <= 9; i++) {
		if (q[i]) {
			if (b)ans++; b = 1;
			if (q[i] == 1)ans += 3;
			else ans += 4 + (q[i] * 2 - 1);
		}
	}
	cout << ans << endl;
}
