#include #define X first #define Y second #define eb push_back #define siz(a) int(a.size()) #define endl "\n" #define trace2(x, y) cout <<#x<<": "< vi; typedef vector < ll > vll; const int mod=1e9+7; const int maxn=1e6+5; /* finding inverse upto n * for i in xrange(2, N): ifc[i] = -(mod / i) * ifc[mod % i] % mod * */ ll power(ll base, ll exp){ll res = 1; while(exp){if(exp%2)res*=base;base*=base;res%=mod;base%=mod;exp/=2;}return res;} //Work Harder :) //Think More :( int flag[5]; int main(){ ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL); //freopen("input.in", "r", stdin);freopen("output.out", "w", stdout); int n, i; cin >> n; string str; cin >> str; int ans = 0; for(i=0; i= 'a' && str[i] <= 'z') flag[0] = 1; else if(str[i] >= 'A' && str[i] <= 'Z') flag[1] = 1; else if(str[i] >= '0' && str[i] <= '9') flag[2] = 1; else flag[3] = 1; } for(i=0; i<4; i++){ if(!flag[i]) ans++; } if(ans + n < 6) ans += 6 - (n + ans); cout << ans; return 0; }