import sys
n=int(input())
s=input()

ans=s.count(".")
if n==ans:
    print(0)
    sys.exit()
for i in range(len(s)):
    if s[i]==".":
        continue
    else:
        print(ans-i)
        break
        