n = int(input())
s = input()
location = 9999999
for i in range(n):
    if s[i] == '#':
        location = i
        break

if location == 9999999:
    print(0)
else:
    print(s[location:n].count('.'))