n=int(input()) s=list(input())[::-1] cnt=3*10**5 while 1