#include #define forn(i,n) for(int i = 0; i < (n); i++) #define forsn(i,s,n) for(int i = (s); i < (n); i++) #define sq(x) ((x) * (x)) #define all(v) ((v).begin, (v).end) #define x real() #define y imag() #define pb push_back #define f first #define s second #define mp make_pair using namespace std; typedef long long int tint; typedef pair par; string spec = "!@#$%^&*()-+"; int main() { int n; cin >> n; string pass; cin >> pass; int ans = 0; int mis = max(6 - n, 0); int m = spec.size(); bool dig = false; forn(i,n) { if(pass[i] >= '0' and pass[i] <= '9') dig = true; } bool lo = false; forn(i,n) { if(pass[i] >= 'a' and pass[i] <= 'z') lo = true; } bool u = false; forn(i,n) { if(pass[i] >= 'A' and pass[i] <= 'Z') u = true; } bool spe = false; forn(i,n) { forn(j,m) { if(pass[i] == spec[j]) spe = true; } } if(!dig) ans++; if(!lo) ans++; if(!u) ans++; if(!spe) ans++; ans = max(ans, mis); cout << ans << endl; return 0; }