#include //#include // Common file //#include // Including seg_tree_order_statistics_node_update #include #include using namespace std; //using namespace __gnu_pbds; typedef long long lo; typedef long double ld; typedef pair ll;//pair typedef vector vl; //vector of long typedef vector vll; //vector of pair typedef priority_queuep_q; typedef vector< vl > vvl; //vector of vectors #define X first #define Y second #define mp(a,b) make_pair((a),(b)) #define REP(a,b) for(lo i=(a);i<(lo)b;i++)//no need to declare variable i #define REPE(a,b,c,d) REP(a,b)for(lo j=(c);j<(lo)d;j++)//no need to declare vaiables i,j #define REPV(a,b,c) for(lo(a)=b;(a)<(c);(a)++)//a is the variable #define IREP(a,b) for(lo i=(a);i>=(b);i--) #define IREPV(a,b,c) for(lo(a)=b;(a)>=(c);(a)--) #define all(v) (v).begin(),(v).end() #define TRV(a) for(auto &it : a) #define INF 55 #define MOD 1000000007 #define M 1000000007 #define BLOCK 300 #define CHECK_BIT(var,pos) ((var) & (1<<(pos))) #define pb(a) push_back((a)) #define eps 1e-8 #define PI 3.141592653589793 #define debug(x) cout<<#x<<"="< ostream& operator<< ( ostream &o,vector v ) { if ( v.size() >0 )o< ostream& operator<< ( ostream &o,pair p ) { return o<<"("< istream& operator>> ( istream &in,vector &v ) { for ( unsigned i=0; i>v[i]; return in; } template istream& operator>> ( istream &in,pair &p ) { in>>p.X; in>>p.Y; return in; } int main(){ std::ios::sync_with_stdio(false); //cin.tie(0);cout.tie(0);cout.precision(20); string a; string b="!@#$%^&*()-+"; bool dig=false,lc=false,uc=false,sc=false; lo len,ans=0; cin>>len>>a; REP(0,a.length()){ if(a[i]<='z' and a[i]>='a')lc=true; else if(a[i]<='Z' and a[i]>='A')uc=true; else if(a[i]<='9' and a[i]>='0')dig=true; else REPV(j,0,b.length())if(a[i]==b[j])sc=true; } if(!lc)ans++,len++; if(!uc)ans++,len++; if(!dig)ans++,len++; if(!sc)ans++,len++; ans+=max(lo(0),6-len); cout<