#include #include #include #include #include #include #include int minimumNumber(int n, char* password) { int i, k, num = 0, l = 0, u = 0, s = 0, c = 0, res; for(i = 0; i < n; i++) { k = (int)password[i]; if(48 <= k && k <= 57) num++; if(97 <= k && k <= 122) l++; if(65 <= k && k <= 90) u++; if(33 <= k && k <= 47) s++; if(k == 64 || k == 94 ) s++; } if(num != 0) c++; if(l != 0) c++; if(u != 0) c++; if(s != 0) c++; res = 4 - c; if(n + res < 6) res = 6 - n; return res; } int main() { int n; scanf("%i", &n); char* password = (char *)malloc(512000 * sizeof(char)); scanf("%s", password); int answer = minimumNumber(n, password); printf("%d\n", answer); return 0; }