import sys input=sys.stdin.readline N=int(input()) balls=input().strip() def find_index(color): # 맨 우측과 좌측 중, 볼이 많이 모여있는 곳 찾기 left, right = 0, 0 for i in range(N): if balls[i] != color: break left += 1 for i in range(N - 1, -1, -1): if balls[i] != color: break right += 1 if left