n=int(input())
s=input()
a=0
b=0
if n%2!=0:
    for i in range(0,n-1,2):
        if s[i]!=s[i+1]:
            a=a+1
    if a>0 and s[n-1]!='#':
        print(a+1)
    else:
        print(a)
else:
    for i in range(0,n-1,2):
        if s[i]!=s[i+1]:
            a=a+1
    print(a)
