N = int(input())
S = input()
binS = []
for i in range(N):
    if S[i] == '.':
        binS.append(0)
    else:
        binS.append(1)
# print(binS)

counter = 0
for i in range(N-1):
    if binS[i] == 1 and binS[i+1] == 0:
        counter += 1

print(counter)
