inline T read(){ T sum = 0, fl = 1; char ch = getchar(); for (; !isdigit(ch); ch = getchar()) if (ch == '-') fl = -1; for (; isdigit(ch); ch = getchar()) sum = sum * 10 + ch - '0'; return sum * fl; }
template <typename T>
inlinevoidwrite(T x){ if (x < 0) { putchar('-'), write<T>(-x); return; } static T sta[35]; int top = 0; do { sta[top++] = x % 10, x /= 10; } while (x); while (top) putchar(sta[--top] + 48); }
intmain(){ IOS; cin >> n >> s; for (int i = 0; i < n; ++i) { if (s[i] == '/') { int l = i - 1, r = i + 1, len = 1; while (l >= 0 && r < n) if (s[l] == '1' && s[r] == '2') --l, ++r, len += 2; // 左右同时寻找,所以是 +2 elsebreak; // 不满足了及时break ans = max(ans, len); } } write<int>(ans); return0; }