#include <stdio.h> #include <string.h> int main() { int num; char str[101]; scanf("%d%s", &num,str); int len = strlen(str); int init = 1; int up = 1; int n = num < 4 ? num : 4; int down = n; for (int i = 0; i < len; i++){ if (str[i] =...