#include using namespace std; #define fr freopen("in.txt", "r", stdin); #define fw freopen("out.txt", "w", stdout); #define sd(x) scanf("%d", &x); #define sl(x) scanf("%lld", &x); #define sf(x) scanf("%lf", &x); #define ll long long #define ull unsigned long long #define F first #define S second #define mem(v, x) memset(v, x, sizeof(v)); #define EB emplace_back #define PB push_back #define MP make_pair int main() { //fr; //fw; string UC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string LC = "abcdefghijklmnopqrstuvwxyz"; string N = "0123456789"; string SC = "!@#$%^&*()-+"; int l; sd(l); string pass; cin >> pass; int res = 0; bool ok = 0; for (int x = 0; x < UC.size(); x++) { for (int y = 0; y < pass.size(); y++) { if (pass[y] == UC[x]) ok = 1; } } if (!ok) res++; ok = 0; for (int x = 0; x < LC.size(); x++) { for (int y = 0; y < pass.size(); y++) { if (pass[y] == LC[x]) ok = 1; } } if (!ok) res++; ok = 0; for (int x = 0; x < N.size(); x++) { for (int y = 0; y < pass.size(); y++) { if (pass[y] == N[x]) ok = 1; } } if (!ok) res++; ok = 0; for (int x = 0; x < SC.size(); x++) { for (int y = 0; y < pass.size(); y++) { if (pass[y] == SC[x]) ok = 1; } } if (!ok) res++; printf("%d", res + max(0, 6 - l - res)); }