#include <bits/stdc++.h>
using namespace std;


string a[4] = {"0123456789", "abcdefghijklmnopqrstuvwxyz",
 "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
	       "!@#$%^&*()-+"};
int v[300];
bool vis[10] = {false};
int main()
{
  int n;
  string str;
  cin >> n >> str;
  for (int i = 0; i < 4; ++i)
    for (auto c : a[i])
      v[c] = i;
  for (int i = 0; i < n; ++i)
    vis[v[str[i]]] = true;
  int ans = 0;
  for (int i = 0; i < 4; ++i)
    ans += !vis[i];
  ans = max(ans, 6-n);
  cout << ans << endl;
}