n = int(input())
s = input()

counter = 0

List = []
for i in range(n):
    List.append(s[i])

counter = 0
for i in range(n-1):
    if List[i] == '#' and List[i+1] == '.':
        List[i+1] = '#'
        counter += 1

print(counter)