#include #include #include #include #include #include #define ll long long using namespace std; ll n, ans; string nn; int main() { string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; cin >> n; cin >> nn; bool a = false; bool b = false; bool c = false; bool d = false; for (ll i = 0; i < nn.length(); i++) { if(numbers.find(nn[i]) != string::npos) a = true; else if(lower_case.find(nn[i]) != string::npos) b = true; else if(upper_case.find(nn[i])!= string::npos) c = true; else if(special_characters.find(nn[i])!= string::npos) d = true; if(a && b && c && d) break; } if(!a) ans++; if(!b) ans++; if(!c) ans++; if(!d) ans++; if(nn.length() + ans < 6) ans += 6 - (nn.length() + ans); cout << ans; }