#define _USE_MATH_DEFINES
#include <iostream>
#include <fstream>
#include <vector>
#include<string>
#include<map>
using namespace std;


int main() {

#ifdef INPUT_FROM_FILE
	ifstream cin("sample.in");
	ofstream cout("sample.out");
#endif
	int N;
	cin >> N;
	string s;
	cin >> s;
	map<char, int> cnt;
	for (auto& i : s){
		if (i != '+')cnt[i]++;
	}
	vector<int> num(10);
	for (auto& it : cnt){
		num[it.second]++;
	}
	int res = 0;
	if (num[1] > 0)res += num[1] * 2;
	for (int i = 2; i < 10; i++){
		if (num[i]>0){
			res += 3;
			if (num[i] > 1)res += 2;
			res += num[i] * 2 - 1;
		}
	}
	res--;
	cout << res << endl;
	return 0;
}