N = input()
stone = input()


for i in range(len(stone) - 1):
  if stone[i] == '#' and stone[i+1] == '.':
    cnt = 0
    for s in stone[i+1:]:
      if s == '.':
        cnt += 1
        
    print(cnt)
    exit()

print('0')    