import re

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

result = len(re.findall('#\.', s))

print(result)
#
# cntList = list()
# for i in range(n+1):
#     tmp = len(re.findall('#', s[:i]))
#     tmp += len(re.findall('\.', s[i:]))
#     cntList.append(tmp)
#
# print(min(cntList))
