#include #include #include #include #include using namespace std; string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; int chk(string s, string chk) { for(int i = 0 ; i < s.length() ; i++) { for(int j = 0 ; j < chk.length() ; j++) { if(s[i] == chk[j]) return 0; } } return 1; } int main() { int n; cin >> n; string s; cin >> s; { int ans = 0; ans = chk(s, numbers) + chk(s, lower_case) + chk(s, upper_case) + chk(s, special_characters); if(n >= 6) cout << ans; else { int add = 6 - n; if(add > ans) cout << add ; else cout << ans; } } return 0; }