n=input()
s=input()
char_list = list(s)

if s.count('.') == 0 or s.count('#') == 0:
  print('0')
else:
  i=0
  for i in range(int(n)):
    if char_list[i] == '#':
      break

  s=s[i:]
  print(s.count('.'))

