//Perfection is not attainable,but if we chase perfection we can catch excellence. #include using namespace std; typedef long long int ll; #define DHOKHA ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) bool a[4]; int main() { DHOKHA; ll n; cin>>n; string s; cin>>s; ll i; for(i=0;i<=n-1;i++) { if(s[i]>=48 && s[i]<=57) { a[0]=true; } else if(s[i]>=97 && s[i]<=122) { a[1]=true; } else if(s[i]>=65 && s[i]<=90) { a[2]=true; } else { a[3]=true; } } ll c=0; for(i=0;i<=3;i++) { if(a[i]==false) { c++; } } if(n+c<6) { cout<<6-n; } else { cout<