#include using namespace std; int main() { int n; cin >> n; bool digit = false; bool lw = false; bool up = false; bool sp = false; string spec = "!@#$%^&*()-+"; string s; cin >> s; for(int i = 0; i < s.length(); i++) { if(s[i] >= '0' && s[i] <= '9') digit = true; if(s[i] >= 'a' && s[i] <= 'z') lw = true; if(s[i] >= 'A' && s[i] <= 'Z') up = true; for(int j = 0; j < spec.length(); j++) if(s[i] == spec[j]) sp = true; } int need = 0; if(!digit) need++; if(!lw) need++; if(!up) need++; if(!sp) need++; cout << max(need, 6 - (int)s.length()); return 0; }