#include using namespace std; const string numbers = "0123456789"; const string lower_case = "abcdefghijklmnopqrstuvwxyz"; const string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const string special_characters = "!@#$%^&*()-+"; bool check(string a, string b) { for (char u : a) { if (b.find(u) < b.size()) { return 1; } } return 0; } int main() { int n; cin >> n; string s; cin >> s; int m = n; if (!check(s, numbers)) m++; if (!check(s, lower_case)) m++; if (!check(s, upper_case)) m++; if (!check(s, special_characters)) m++; if (m < 6) { m = 6; } cout << m - n << endl; return 0; }