#include #include #include #include #include using namespace std; int n; bool tong[10000], f[5]; const string ch = "!@#$%^&*()-+"; string s; int main() { for (int i = 0; i < ch.size(); i ++) tong[ch[i]] = 1; scanf("%d", &n); cin >> s; int l = s.size(); for (int i = 0; i < l; i ++){ if (isdigit(s[i])) f[0] = true; if (s[i] >= 'a' && s[i] <= 'z') f[1] = true; if (s[i] >= 'A' && s[i] <= 'Z') f[2] = true; if (tong[s[i]]) f[3] = true; } int ans = 0; for (int i = 0; i < 4; i ++) if (!f[i]) ans ++; ans = max(ans, 6-l); printf("%d\n", ans); return 0; }