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

count = 0
s2=''

for i, wb in enumerate(s):
    print(i, wb)
    if i != (n-1):
        if wb == '#':
            s2 = s[i:]
            break

count = s2.count('.')
print(count)