#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ string s; int n; cin >>n >> s; set ch = {'!','@','#','$','%','^','&','*','(',')','-','+'}; int d = 1, u = 1,l =1,sp =1; int ans = max(0,6 - (int)s.length() ); for(auto c : s){ // cout << c << "\n"; if(ch.find(c) != ch.end()) sp = 0; else if(isdigit(c)) d =0; else if(isalpha(c) && isupper(c)) u =0; else if(isalpha(c) && islower(c)) l =0; } // cout << d << u << l << sp << "\n"; int val = d + u + l + sp; ans = max(ans,val); cout << ans ; return 0; }