#include using namespace std; typedef long long ll; typedef pair ii; typedef vector vi; typedef vector vii; #define ALL(x) (x).begin(),(x).end() #define ff first #define ss second #define D(a) //cerr << ">> " << #a << " = >" << a << "<" << endl #define PB push_back #define F(i,a,b) for ( int i = (a); i < (b); ++i ) #define FD(i,a,b) for ( int i = (a); i >= (b); --i ) #define R1(a) scanf("%d",&a) #define R2(a,b) scanf("%d%d",&a,&b) #define R3(a,b,c) scanf("%d%d%d",&a,&b,&c) #define DR1(a) int a; scanf("%d",&a) #define DR2(a,b) int a,b; scanf("%d%d",&a,&b) #define DR3(a,b,c) int a,b,c; scanf("%d%d%d",&a,&b,&c) const int INF = 1e9+7; const int DEBUG = 0; const ii T = { 1, 100 }; const ii M = { 1, 100 }; // size of photo const ii C = { -1e9, +1e9 }; // range of coordinates const ii N = { 2, 1e6 }; bool between(int value, int lower, int upper) { return value >= lower && value <= upper; } int main( ) { ios::sync_with_stdio(0); int t, n, x, y; string line; getline(cin, line); getline(cin, line); int toAdd = 0; if ( line.find_first_of("0123456789") == string::npos ) ++toAdd; D(toAdd); if ( line.find_first_of("abcdefghijklmnopqrstuvwxyz") == string::npos ) ++toAdd; D(toAdd); if ( line.find_first_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ") == string::npos ) ++toAdd; D(toAdd); if ( line.find_first_of("!@#$%^&*()-+") == string::npos ) ++toAdd; D(toAdd); if (line.size() + toAdd < 6) toAdd = 6 - line.size(); D(toAdd); cout << toAdd << endl; return 0; }