N=int(input())
S=input()

while True:
    x=''
    ans=''
    for i in S:
       if (x==''):
        x=i
        continue
       if x!=i:
        #print("p:",x,i,ans)
        ans+=x
        x=i
        #print("a:",x,i,ans)

    ans+=x
    #print('ans:',ans)
    if ans==S:
        break
    else:
        S=ans
print(len(ans))        N=int(input()) N int(input()) int input() input S=input() S input() input while True:
    x=''
    ans=''
    for i in S:
       if (x==''):
        x=i
        continue
       if x!=i:
        #print("p:",x,i,ans)
        ans+=x
        x=i
        #print("a:",x,i,ans)

    ans+=x
    #print('ans:',ans)
    if ans==S:
        break
    else:
        S=ans True x='' x '' ans='' ans '' for i in S:
       if (x==''):
        x=i
        continue
       if x!=i:
        #print("p:",x,i,ans)
        ans+=x
        x=i
        #print("a:",x,i,ans)

     i S if (x==''):
        x=i
        continue
        x=='' x '' x=i x i continue if x!=i:
        #print("p:",x,i,ans)
        ans+=x
        x=i
        #print("a:",x,i,ans)

     x!=i x i ans+=x ans x x=i x i ans+=x ans x if ans==S:
        break
    else:
        S=ans ans==S ans S break S=ans S ans print(len(ans)) print len(ans) len ans x=i i x S=input() input() S x=i i x S=ans ans S ans='' '' ans N=int(input()) int(input()) N ans+=x x ans ans+=x x ans x='' '' x
N=int(input())
S=input()

while True:
    x=''
    ans=''
    for i in S:
       if (x==''):
        x=i
        continue
       if x!=i:
        #print("p:",x,i,ans)
        ans+=x
        x=i
        #print("a:",x,i,ans)

    ans+=x
    #print('ans:',ans)
    if ans==S:
        break
    else:
        S=ans
print(len(ans))       