#pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #define __USE_MINGW_ANSI_STDIO 0 #include using namespace std; #define dbg(x) cerr << #x << " == " << x << "\n"; #define PI acos(-1) #define pb push_back #define fi first #define se second #define TASK "" #define sz(a) (int)(a).size() #define all(c) (c).begin(), (c).end() #define TIMESTAMP fprintf(stderr, "Execution time: %.3lf s.\n", (double)clock()/CLOCKS_PER_SEC) string to_string(string s) { return '"' + s + '"'; } string to_string(const char* s) { return to_string((string) s); } template string to_string(pair p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; } template string to_string(A v) { bool first = true; string res = "{"; for (const auto &x : v) { if (!first) { res += ", "; } first = false; res += to_string(x); } res += "}"; return res; } void debug_out() { cerr << endl; } template void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif typedef long long ll; typedef long double ld; typedef vector vi; typedef vector vll; typedef pair pii; typedef vector vvi; typedef vector vpii; typedef vector vs; const int MAXN = 1e5 + 9; const int MOD = (int)(1e9 + 7); const int LOG2MAXN = 17; const int INF = 1e9; const ld eps = 1e-9; int di[] = {0, 1, 0, -1}; int dj[] = {1, 0, -1, 0}; char ddir[] = {'R', 'U', 'L', 'D'}; mt19937_64 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); void solve() { } void input() { string s; int n; cin >> n >> s; string special = "!@#$%^&*()-+"; bool lower = 0, upper = 0, digit = 0, sp = 0; for(auto x : s) { if(x >= 'a' && x <= 'z') lower = 1; if(x >= 'A' && x <= 'Z') upper = 1; if(x >= '0' && x <= '9') digit = 1; for(auto y : special) if(y == x) sp = 1; } int len = sz(s) + (int)!lower + (int)!upper + (int)!sp + (int)!digit; debug(len); cout << ((int)!lower + (int)!upper + (int) !sp + (int)!digit) + max(0, 6 - len) << endl; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); #ifdef LOCAL freopen("xxx.in", "r", stdin); freopen("xxx.out", "w", stdout); #else //freopen(TASK".in", "r", stdin); //freopen(TASK".out", "w", stdout); #endif input(); solve(); #ifdef LOCAL TIMESTAMP; #endif return 0; }