n = int(input())
s = input()
# white:'.' , black:'#'
for i in range(n):
  if s[i] == '#':
    start = i
    break
else:
  start = n
ans = 0
for i in range(start, n):
  if s[i] == '.':
    ans += 1
print(ans)