#include int main() { char numbers[] = "0123456789"; char lower_case[] = "abcdefghijklmnopqrstuvwxyz"; char upper_case[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char special_characters[] = "!@#$%^&*()-+"; int n; scanf("%d",&n); char ans[n+1]; scanf("%s",ans); int no=0; int low=0; int up=0; int spec=0; for (int i = 0; i < n; i++) { for (int j = 0; j < 10; j++) { if (numbers[j] == ans[i]) no++; } for (int k = 0; k < 26; k++) { if (lower_case[k] == ans[i]) low++; } for (int l = 0; l < 26; l++) { if (upper_case[l] == ans[i]) up++; } for (int m = 0; m < 12; m++) { if (special_characters[m] == ans[i]) spec++; } } int length = n; int moves=0; if (low < 1) { length++; moves++; } if (up < 1) { length++; moves++; } if (no < 1) { length++; moves++; } if (spec < 1) { length++; moves++; } if (length < 6) { printf("%d",6-length+moves); } if (length >= 6) { printf("%d",moves); } }