N = input()
S = input()

first = S[0]
count = 0
if first == '#':
    for i in S:
        if i == '.':
            count += 1
else:
    for i in S:
        if i == '#':
            count += 1
print(count)
