#include using namespace std; string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; int n; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ cin >> n; string s; cin >> s; int ret = 0; // check digit bool has1 = false; for(auto c: numbers) { if (s.find(c) != -1) { has1 = true; break; } } if (has1 == false) ret += 1; // check lowercase bool has2 = false; for(auto c: lower_case) { if (s.find(c) != -1) { has2 = true; break; } } if (has2 == false) ret += 1; // check uppercase bool has3 = false; for(auto c: upper_case) { if (s.find(c) != -1) { has3 = true; break; } } if (has3 == false) ret += 1; // check special bool has4 = false; for(auto c: special_characters) { if (s.find(c) != -1) { has4 = true; break; } } if (has4 == false) ret += 1; if (s.size() + ret < 6) ret += 6 - s.size() - ret; cout << ret << endl; return 0; }