b = input()
a = list(str(input()))
counter = int(0)
if len(a) == 1:
    counter = 0
else:
    for i in range(0,len(a)-1):
        if a[i] == "#":
            if a[i] != a[i+1]:
                a[i+1] = '#'
                counter = counter + 1
        else:
            pass
print(counter)