#include using namespace std; string numbers = "0123456789", lower_case = "abcdefghijklmnopqrstuvwxyz", upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", special_characters = "!@#$%^&*()-+"; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ string s; int i, j, n, ans = 0; cin >> n; cin >> s; bool ok1 = false, ok2 = false, ok3 = false, ok4 = false; for(i = 0; i < numbers.length(); ++i) { if(s.find(numbers[i]) != string :: npos) ok1 = true; } if(!ok1) ans++; for(i = 0; i < lower_case.length(); ++i) { if(s.find(lower_case[i]) != string :: npos) ok2 = true; } if(!ok2) ans++; for(i = 0; i < upper_case.length(); ++i) { if(s.find(upper_case[i]) != string :: npos) ok3 = true; } if(!ok3) ans++; for(i = 0; i < special_characters.length(); ++i) { if(s.find(special_characters[i]) != string :: npos) ok4 = true; } if(!ok4) ans++; if(n < 6) { if(n + ans < 6) { cout << 6 - n << endl; } else cout << ans << endl; return 0; } cout << ans << endl; return 0; }