#include using namespace std; typedef long long ll; typedef long double ld; #define pb push_back string numbers = "0123456789"; string lower_case = "abcdefghijklmnopqrstuvwxyz"; string upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string special_characters = "!@#$%^&*()-+"; int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n; cin >> n; for (int tt = 1; tt <= 1; tt++){ string s; cin >> s; int kol1=0; int kol2=0; int kol3=0; int kol4=0; for (int i = 0; i < s.size(); i++){ for (int j = 0; j < numbers.size(); j++){ if (s[i] == numbers[j]){ kol1=1; break; } } for (int j = 0; j < lower_case.size(); j++){ if (s[i] == lower_case[j]){ kol2=1; break; } } for (int j = 0; j < upper_case.size(); j++){ if (s[i] == upper_case[j]){ kol3=1; break; } } for (int j = 0; j < special_characters.size(); j++){ if (s[i] == special_characters[j]){ kol4=1; break; } } } int kek = 4 - (kol1+kol2+kol3+kol4); int ans = 1e9; if (s.size() < 6){ ans = max(kek, 6-(int)s.size()); } else ans = kek; cout << ans; } }