/*input 11 #HackerRank */ /* When you walk through a storm Hold your head up high And don't be afraid of the dark At the end of the storm There's a golden sky And the sweet silver song of the lark Walk on, through the wind Walk on, through the rain Though your dreams be tossed and blown Walk on, walk on With hope in your heart And you'll never walk alone YNWA */ //hell_hacker //IT TAKES EVERYTHING and IT IS NOT LUCK //PICK ME LAST -- COME OUT OF N^WHERE #include using namespace std; #define endl '\n' #define fo(i,n) for(i=0;i=0;--i) #define all(x) (x).begin(),(x).end() #define sz(x) (int)(x).size() #define fi first #define se second #define mp make_pair #define pb push_back #define yolo "debug_statement" typedef long long int ll; typedef long double ld; typedef pair ii; typedef vector vii; typedef vector vi; const ll inf = 1e9; const ld eps = 1e-9; const ld pi=acos(-1); const ll mod=1000000007; ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;} #if DEBUG && !ONLINE_JUDGE #define debug(args...) (Debugger()) , args class Debugger { public: Debugger(const std::string& _separator = ", ") : first(true), separator(_separator){} template Debugger& operator , (const ObjectType& v) { if(!first) std::cerr << separator; std::cerr << v; first = false; return *this; } ~Debugger() { std::cerr << endl;} private: bool first; std::string separator; }; template inline std::ostream& operator << (std::ostream& os, const std::pair& p) { return os << "(" << p.first << ", " << p.second << ")"; } template inline std::ostream& operator << (std::ostream& os, const std::array& a){ bool first = true; os << "["; for(unsigned int i = 0; i < N; i++) { if(!first) os << ", "; os << a[i]; first = false; } return os << "]"; } template inline std::ostream &operator << (std::ostream & os,const std::vector& v) { bool first = true; os << "["; for(unsigned int i = 0; i < v.size(); i++) { if(!first) os << ", "; os << v[i]; first = false; } return os << "]"; } template inline std::ostream &operator << (std::ostream & os,const std::set& v) { bool first = true; os << "["; for (typename std::set::const_iterator iii = v.begin(); iii != v.end(); ++iii) { if(!first) os << ", "; os << *iii; first = false; } return os << "]"; } template inline std::ostream &operator << (std::ostream & os,const std::map& v) { bool first = true; os << "["; for (typename std::map::const_iterator iii = v.begin(); iii != v.end(); ++iii) { if(!first) os << ", "; os << *iii ; first = false; } return os << "]"; } #else #define debug(args...) // Just strip off all debug tokens #endif bool f1, f2, f3, f4; int main(){ ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); string s; int n; cin >> n; cin >> s; int kitne = 0; // numbers = "0123456789" // lower_case = "abcdefghijklmnopqrstuvwxyz" // upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // special_characters = "!@#$%^&*()-+" int i; fo(i,sz(s)){ if(s[i] >= '0' && s[i] <='9')f1 = true; if(s[i] >= 'a' && s[i] <='z')f2 = true; if(s[i] >= 'A' && s[i] <='Z')f3 = true; if(s[i] == '!' || s[i] == '@' || s[i] == '#' || s[i] == '$' || s[i] == '%' || s[i] == '^' || s[i] == '&' || s[i] == '*' || s[i] == '(' || s[i] == ')' || s[i] == '-' || s[i] == '+')f4 = true; } if(!f1)kitne++; if(!f2)kitne++; if(!f3)kitne++; if(!f4)kitne++; // cout << kitne << endl; n += kitne ; // cout << n << endl; cout << kitne + max(0,6 - n) << endl; // cout << 6 - sz(s) + kitne - 4 << endl; return 0; }