a = int(input())
b = list(str(input()))

print(b)
try:
    firstb = b.index('#')
except ValueError:
    firstb = len(b) + 1

numberb = b[firstb:].count('#')
if b[-1] == '#':
    numberb -= 1
numberw = b[firstb:].count('.')

if numberb < numberw:
    print(numberb)
else:
    print(numberw)