import sys
input = sys.stdin.readline


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



pre = s[0]
for i in range(1, n):
    if pre=='#' and s[i]=='.':
        temp = i
        break
    pre = s[i]



try:
    s = s[temp:]
    ans = sum(1 for x in s if x=='.')
    print(ans)
except:
    print(0)