#include #include #include using namespace std; char str[105]; bool flag[4]; int main() { int n; //char x[100]="!@#$%^&*-+"; scanf("%d",&n); scanf("%s",str+1); for(int i=1;i<=n;i++){ if(str[i]<='z'&&str[i]>='a')flag[0]=1; else if(str[i]<='Z'&&str[i]>='A')flag[1]=1; else if(str[i]<='9'&&str[i]>='0')flag[2]=1; else flag[3]=1; } printf("%d\n",max(6-n,(!flag[0])+(!flag[1])+(!flag[2])+(!flag[3]))); return 0; }