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

num = 0
for i in range(n):
    print(s[i])
    try:
        if s[i] == '#' and s[i+1] == ('.'):
            num += 1
            s[i+1] = '#'
        else:
            pass
    except:
        break
print(num)