#include using namespace std; #define ll long long #define mp make_pair #define ss second #define ff first #define pb push_back #define ld long double const int N = 1e6 + 11; const int MAX = 1e8; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin>>n; string s; getline(cin,s); getline(cin,s); int k=0,l=0,r=0,p=0; for (int i=0; i='A'&&s[i]<='Z') k=1; if (s[i]>='a'&&s[i]<='z') l=1; if (s[i]>='0'&&s[i]<='9') r=1; 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]=='+') p=1; } int res=1-k+1-l+1-r+1-p; if (res<6-n) res=6-n; cout<