n = int(input())
s = str(input())
#最初の#
try:
        k = s.index("#")
except:
        k = n
if k == n - 1 or k == n:
        ans = 0
else:
        #print(s[k::])
        ans = s[k::].count(".")
print(ans)