#include #include #include #include #include using namespace std; #define sz(x) (int)(x.size()) #define fi(a,b) for(int i=a;i=b;--i) #define fdj(a,b) for(int j=a-1;j>=b;--j) #define fdo(a,b) for(int o=a-1;o>=b;--o) #define pb push_back #define mp make_pair typedef long long ll; typedef pair pii; typedef pair pll; ////////////////// void solve(){ string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; string s; int n; cin >> n; cin >> s; bool a = true, b = true, c = true, d = true; fi(0, n){ if(numbers.find(s[i]) != string::npos) a = 0; if(lower_case.find(s[i]) != string::npos) b = 0; if(upper_case.find(s[i]) != string::npos) c = 0; if(special_characters.find(s[i]) != string::npos) d = 0; } int ans = 0; ans += a; ans += b; ans += c; ans += d; ans = max(ans, 6 - n); cout << ans << endl; } int main(){ #ifdef _DEBUG freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif solve(); return 0; }