#include using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define ff first #define ss second #define mp make_pair #define pb push_back #define int long long #define trace1(x) cerr<<#x<<": "< T gcd(T a,T b) { if(a==0) return b; return gcd(b%a,a); } template T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; } const int N=1e5+5; int32_t main() { IOS; int n; cin>>n; string s; cin>>s; int ans=0; int check=0; for(auto it:s) { if(it<='z'&&it>='a') check=1; } if(!check) ans++; check=0; for(auto it:s) { if(it>='A'&&it<='Z') check=1; } if(!check) ans++; check=0; for(auto it:s) { if(it<='9'&&it>='0') check=1; } if(!check) ans++; check=0; string special="!@#$%^&*()-+"; for(auto it:s) { if(special.find(it)!=string::npos) check=1; } if(!check) ans++; ans=max(ans, 6-n); cout<